當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserAccountModel::getEmail方法代碼示例

本文整理匯總了PHP中models\UserAccountModel::getEmail方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserAccountModel::getEmail方法的具體用法?PHP UserAccountModel::getEmail怎麽用?PHP UserAccountModel::getEmail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在models\UserAccountModel的用法示例。


在下文中一共展示了UserAccountModel::getEmail方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildForm

 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     global $CONFIG;
     $builder->add('subject', 'text', array('label' => 'Subject', 'required' => true, 'max_length' => VARCHAR_COLUMN_LENGTH_USED, 'attr' => array('autofocus' => 'autofocus')));
     $builder->add('email', 'email', array('label' => 'Email', 'required' => true, 'max_length' => VARCHAR_COLUMN_LENGTH_USED, 'data' => $this->currentUser ? $this->currentUser->getEmail() : ''));
     $builder->add('message', 'textarea', array('label' => 'Message', 'required' => true));
     if ($CONFIG->contactFormAntiSpam && !$this->currentUser) {
         $builder->add('antispam', 'text', array('label' => 'What is 2 + 2?', 'required' => true));
         $myExtraFieldValidatorSpam = function (FormEvent $event) {
             $form = $event->getForm();
             $myExtraField = $form->get('antispam')->getData();
             if ($myExtraField != '4' && $myExtraField != 'four') {
                 $form['antispam']->addError(new FormError("Please prove you are human"));
             }
         };
         $builder->addEventListener(FormEvents::POST_BIND, $myExtraFieldValidatorSpam);
     }
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:18,代碼來源:ContactForm.php

示例2: checkUserInTest1

 protected function checkUserInTest1(UserAccountModel $user)
 {
     $this->assertEquals("test", $user->getUsername());
     $this->assertEquals("test@jarofgreen.co.uk", $user->getEmail());
     $this->assertEquals(false, $user->checkPassword("1234"));
     $this->assertEquals(true, $user->checkPassword("password"));
     $this->assertEquals(false, $user->getIsEmailVerified());
     $this->assertEquals(false, $user->getIsSystemAdmin());
     $this->assertEquals(true, $user->getIsEditor());
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:10,代碼來源:UserCreateTest.php

示例3: create

 public function create(UserAccountModel $user)
 {
     global $DB;
     $uavem = new UserAccountVerifyEmailModel();
     $uavem->setEmail($user->getEmail());
     $uavem->setUserAccountId($user->getId());
     $uavem->setAccessKey(createKey(2, 250));
     // TODO check not already used
     $stat = $DB->prepare("INSERT INTO user_account_verify_email (user_account_id, email, access_key, created_at) " . "VALUES (:user_account_id, :email, :access_key, :created_at)");
     $stat->execute(array('user_account_id' => $uavem->getUserAccountId(), 'access_key' => $uavem->getAccessKey(), 'email' => substr($uavem->getEmail(), 0, VARCHAR_COLUMN_LENGTH_USED), 'created_at' => \TimeSource::getFormattedForDataBase()));
     return $uavem;
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:12,代碼來源:UserAccountVerifyEmailRepository.php

示例4: getSendFromName

 public function getSendFromName(UserAccountModel $sentBy)
 {
     global $CONFIG;
     return $CONFIG->siteTitle . " on behalf of " . $sentBy->getEmail();
 }
開發者ID:radical-assembly,項目名稱:OpenACalendar-Web-Core,代碼行數:5,代碼來源:SendEmailModel.php

示例5: editEmail

 /**
  * This does not provide any audit logging and is for use by sys admins only.
  * @param UserAccountModel $user
  */
 public function editEmail(UserAccountModel $user)
 {
     global $DB;
     $stat = $DB->prepare("UPDATE user_account_information SET  email=:email, email_canonical=:email_canonical  WHERE id =:id");
     $stat->execute(array('id' => $user->getId(), 'email' => substr($user->getEmail(), 0, VARCHAR_COLUMN_LENGTH_USED), 'email_canonical' => substr(UserAccountModel::makeCanonicalEmail($user->getEmail()), 0, VARCHAR_COLUMN_LENGTH_USED)));
 }
開發者ID:schlos,項目名稱:MeetYourNextMP-Web-Core,代碼行數:10,代碼來源:UserAccountRepository.php


注:本文中的models\UserAccountModel::getEmail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。