当前位置: 首页>>代码示例>>PHP>>正文


PHP opToolkit::isEnabledRegistration方法代码示例

本文整理汇总了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;
  }
开发者ID:nothan,项目名称:opAuthMailAddressPlugin,代码行数:31,代码来源:opRequestRegisterURLForm.class.php

示例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;
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:9,代码来源:actions.class.php

示例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;
 }
开发者ID:nise-nabe,项目名称:ppcon-sns,代码行数:17,代码来源:actions.class.php

示例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');
?>
开发者ID:shotaatago,项目名称:OpenPNE3,代码行数:31,代码来源:_partsLogin.php

示例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;
 }
开发者ID:Kazuhiro-Murota,项目名称:OpenPNE3,代码行数:31,代码来源:sfOpenPNEMemberAction.class.php

示例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 
}
?>
开发者ID:kawahara,项目名称:OpenPNE3,代码行数:30,代码来源:loginSuccess.php


注:本文中的opToolkit::isEnabledRegistration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。