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


PHP User::getEmail方法代碼示例

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


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

示例1: testEmail

 public function testEmail()
 {
     $user = new User();
     $mail = 'tony@mail.org';
     $this->assertNull($user->getEmail());
     $user->setEmail($mail);
     $this->assertEquals($mail, $user->getEmail());
 }
開發者ID:ashutosh-srijan,項目名稱:findit_akeneo,代碼行數:8,代碼來源:UserTest.php

示例2: testSendEmail

 /**
  * @dataProvider sendEmailResultProvider
  *
  * @param User $user
  * @param string $emailType
  * @param string $expectedEmailType
  */
 public function testSendEmail(User $user, $emailType, $expectedEmailType)
 {
     $templateName = 'email_template_name';
     $templateParams = ['entity' => $user];
     $expectedMessage = $this->buildMessage($user->getEmail(), 'email subject', 'email body', $expectedEmailType);
     $this->assertSendCalled($templateName, $templateParams, $expectedMessage, $emailType);
     $this->mailProcessor->getEmailTemplateAndSendEmail($user, $templateName, $templateParams);
 }
開發者ID:Maksold,項目名稱:platform,代碼行數:15,代碼來源:BaseProcessorTest.php

示例3: buildFullEmailAddress

 /**
  * @param User $user
  *
  * @return string
  */
 public function buildFullEmailAddress(User $user)
 {
     return $this->emailAddressHelper->buildFullEmailAddress($user->getEmail(), $this->entityNameResolver->getName($user));
 }
開發者ID:ramunasd,項目名稱:platform,代碼行數:9,代碼來源:EmailModelBuilderHelper.php

示例4: sendInviteMail

 /**
  * Send invite email to new user
  *
  * @param User   $user
  * @param string $plainPassword
  *
  * @throws \RuntimeException
  */
 protected function sendInviteMail(User $user, $plainPassword)
 {
     if (in_array(null, [$this->cm, $this->mailer, $this->templating], true)) {
         throw new \RuntimeException('Unable to send invitation email, unmet dependencies detected.');
     }
     $senderEmail = $this->cm->get('oro_notification.email_notification_sender_email');
     $senderName = $this->cm->get('oro_notification.email_notification_sender_name');
     $message = \Swift_Message::newInstance()->setSubject('Invite user')->setFrom($senderEmail, $senderName)->setTo($user->getEmail())->setBody($this->templating->render('OroUserBundle:Mail:invite.html.twig', ['user' => $user, 'password' => $plainPassword]), 'text/html');
     $this->mailer->send($message);
 }
開發者ID:nmallare,項目名稱:platform,代碼行數:18,代碼來源:UserHandler.php

示例5: addEmailUser

 /**
  * @param $randomTemplate
  * @param User $owner
  * @param Contact $contact
  * @param EmailOrigin $origin
  *
  * @return EmailUser
  */
 protected function addEmailUser($randomTemplate, $owner, $contact, $origin)
 {
     $emailUser = $this->emailEntityBuilder->emailUser($this->templates[$randomTemplate]['Subject'], $owner->getEmail(), $contact->getPrimaryEmail()->getEmail(), new \DateTime('now'), new \DateTime('now'), new \DateTime('now'));
     $this->setSecurityContext($owner);
     $emailUser->setFolder($origin->getFolder(FolderType::SENT));
     $emailUser->setOwner($owner);
     $emailUser->setOrganization($owner->getOrganization());
     $emailBody = $this->emailEntityBuilder->body("Hi,\n" . $this->templates[$randomTemplate]['Text'], false, true);
     $emailUser->getEmail()->setEmailBody($emailBody);
     $emailUser->getEmail()->setMessageId(sprintf('<id.%s@%s', uniqid(), '@bap.migration.generated>'));
     return $emailUser;
 }
開發者ID:rodolfobandeira,項目名稱:crm,代碼行數:20,代碼來源:LoadEmailData.php

示例6: testSendResetPasswordAsAdminEmail

 public function testSendResetPasswordAsAdminEmail()
 {
     $this->assertSendCalled(Processor::TEMPLATE_USER_RESET_PASSWORD_AS_ADMIN, ['entity' => $this->user], $this->buildMessage($this->user->getEmail()));
     $this->mailProcessor->sendResetPasswordAsAdminEmail($this->user);
 }
開發者ID:ramunasd,項目名稱:platform,代碼行數:5,代碼來源:ProcessorTest.php

示例7: getObfuscatedEmail

 /**
  * Get the truncated email displayed when requesting the resetting.
  * The default implementation only keeps the part following @ in the address.
  *
  * @param User $user
  *
  * @return string
  */
 protected function getObfuscatedEmail(User $user)
 {
     $email = $user->getEmail();
     if (false !== ($pos = strpos($email, '@'))) {
         $email = '...' . substr($email, $pos);
     }
     return $email;
 }
開發者ID:nmallare,項目名稱:platform,代碼行數:16,代碼來源:ResetController.php

示例8: getUserDependingOnType

 /**
  * @param OroUser|ApiUser|int $user
  * @return \Diamante\UserBundle\Entity\DiamanteUser|\Oro\Bundle\UserBundle\Entity\User
  */
 private function getUserDependingOnType($user)
 {
     if ($user instanceof OroUser) {
         return $user;
     }
     if ($user instanceof ApiUser) {
         $userId = $this->userService->verifyDiamanteUserExists($user->getEmail());
         $user = empty($userId) ? $user : new User($userId, User::TYPE_DIAMANTE);
     }
     $result = $this->userService->getByUser($user);
     return $result;
 }
開發者ID:jalopezsuarez,項目名稱:diamantedesk-application,代碼行數:16,代碼來源:EmailNotifier.php

示例9: testSendRFPNotification

 public function testSendRFPNotification()
 {
     $this->assertSendCalled(Processor::CREATE_REQUEST_TEMPLATE_NAME, ['entity' => $this->request], $this->buildMessage($this->user->getEmail()));
     $this->mailProcessor->sendRFPNotification($this->request, $this->user);
 }
開發者ID:hafeez3000,項目名稱:orocommerce,代碼行數:5,代碼來源:ProcessorTest.php


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