当前位置: 首页>>代码示例>>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;未经允许,请勿转载。