本文整理汇总了PHP中opToolkit::isEnabledRegistration方法的典型用法代码示例。如果您正苦于以下问题:PHP opToolkit::isEnabledRegistration方法的具体用法?PHP opToolkit::isEnabledRegistration怎么用?PHP opToolkit::isEnabledRegistration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类opToolkit
的用法示例。
在下文中一共展示了opToolkit::isEnabledRegistration方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validate
public function validate($validator, $values, $arguments = array())
{
if (opToolkit::isMobileEmailAddress($values['mail_address']))
{
$mailValidator = new sfValidatorMobileEmail();
$values['mobile_address'] = $mailValidator->clean($values['mail_address']);
$mode = 'mobile';
}
else
{
$mailValidator = new opValidatorPCEmail();
$values['pc_address'] = $mailValidator->clean($values['mail_address']);
$mode = 'pc';
}
if (!opToolkit::isEnabledRegistration($mode))
{
throw new sfValidatorError($validator, 'invalid');
}
if (!empty($values['mobile_address']) && !$this->validateAddress('mobile_address', $values['mobile_address']))
{
$this->doNotSend = true;
}
if (!empty($values['pc_address']) && !$this->validateAddress('pc_address', $values['pc_address']))
{
$this->doNotSend = true;
}
return $values;
}
示例2: executeRequestRegisterURL
public function executeRequestRegisterURL($request)
{
$adapter = new opAuthAdapterMailAddress('MailAddress');
if ($adapter->getAuthConfig('invite_mode') < 2) {
$this->forward404();
}
$this->forward404Unless(opToolkit::isEnabledRegistration());
return sfView::INPUT;
}
示例3: executeRequestRegisterURL
public function executeRequestRegisterURL($request)
{
$adapter = new opAuthAdapterMailAddress('MailAddress');
if ($adapter->getAuthConfig('invite_mode') < 2) {
$this->forward404();
}
$this->forward404Unless(opToolkit::isEnabledRegistration());
$this->form = new opRequestRegisterURLForm(null, array('authMode' => 'MailAddress'));
if ($request->isMethod('post')) {
$this->form->bind($request->getParameter('request_register_url'));
if ($this->form->isValid()) {
$this->form->sendMail();
return sfView::SUCCESS;
}
}
return sfView::INPUT;
}
示例4: __
?>
>
<?php
echo $form;
?>
<center>
<input type="submit" value="<?php
echo __('Login');
?>
">
</center>
</form>
<?php
if ($form->getAuthAdapter()->getAuthConfig('invite_mode') == 2 && opToolkit::isEnabledRegistration('mobile') && $form->getAuthAdapter()->getAuthConfig('self_invite_action')) {
echo link_to(__('Registration'), $form->getAuthAdapter()->getAuthConfig('self_invite_action'));
}
?>
<?php
if ($form->getAuthAdapter()->getAuthConfig('help_login_error_action')) {
?>
<br><?php
echo link_to(__('Can not access your account?'), $form->getAuthAdapter()->getAuthConfig('help_login_error_action'));
}
?>
<?php
include_customizes($id, 'bottom');
?>
示例5: executeInvite
/**
* Executes invite action
*
* @param sfRequest $request A request object
*/
public function executeInvite($request)
{
if (!$this->getUser()->getAuthAdapter()->getAuthConfig('invite_mode') || !opToolkit::isEnabledRegistration()) {
return sfView::ERROR;
}
$this->form = new InviteForm(null, array('invited' => true));
$this->form->setOption('is_link', true);
if ($request->isMethod('post')) {
$this->form->bind($request->getParameter('member_config'));
if ($this->form->isValid()) {
$this->form->save();
return sfView::SUCCESS;
}
}
$id = $this->getUser()->getMemberId();
$this->invites = $this->getUser()->getMember()->getInvitingMembers();
$this->listform = new InvitelistForm(array(), array('invites' => $this->invites));
if ($request->isMethod('post')) {
$this->listform->bind($request->getParameter('invitelist'));
if ($this->listform->isValid()) {
$this->listform->save();
$this->redirect('member/invite');
}
}
return sfView::INPUT;
}
示例6: url_for
<form action="<?php
echo url_for(sprintf('member/login?%s=%s', sfOpenPNEAuthForm::AUTH_MODE_FIELD_NAME, $form->getAuthMode()));
?>
" method="post">
<?php
foreach ($form as $name => $field) {
echo $field->render();
}
?>
<input type="image" name="submit" src="<?php
echo image_path('dummy.gif');
?>
" id="button_login" alt="ログイン" />
<?php
if ($form->getAuthAdapter()->getAuthConfig('invite_mode') == 2 && opToolkit::isEnabledRegistration('pc')) {
echo link_to('<img src="' . image_path('dummy.gif') . '" alt="新規登録" />', $form->getAuthAdapter()->getAuthConfig('self_invite_action'), array('id' => 'button_new_regist'));
}
?>
<div class="msg lh_130">
<?php
if ($form->getAuthAdapter()->getAuthConfig('help_login_error_action')) {
?>
<br />
<span class="password_query"><?php
echo link_to(__('Can not access your account?'), $form->getAuthAdapter()->getAuthConfig('help_login_error_action'));
?>
</span>
<?php
}
?>