本文整理汇总了PHP中Symfony\Component\Security\Core\User\UserInterface::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP UserInterface::getEmail方法的具体用法?PHP UserInterface::getEmail怎么用?PHP UserInterface::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Security\Core\User\UserInterface
的用法示例。
在下文中一共展示了UserInterface::getEmail方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAuthorEmail
public function getAuthorEmail()
{
if (null === $this->author) {
return $this->author_email;
}
return $this->author->getEmail();
}
示例2: isEqualTo
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof LdapUser || $user->getUsername() !== $this->username || $user->getEmail() !== $this->email || count(array_diff($user->getRoles(), $this->roles)) > 0 || $user->getDn() !== $this->dn) {
return false;
}
return true;
}
示例3: authorizeUser
public function authorizeUser(UserInterface $authenticatedUser)
{
$user = $this->userManager->findUserByEmail($authenticatedUser->getEmail());
if (null == $user) {
throw new FailureAuthorizedException(401, "XSolve Google Auth couldn't authorize user. User doesn't exists");
}
return $user;
}
示例4: createVanillaUser
/**
* @param UserInterface $user
* @return VanillaUser
*/
public function createVanillaUser(UserInterface $user)
{
/** @var $user \FOS\UserBundle\Model\User */
$vanillaUser = new VanillaUser($user->getUsername());
$vanillaUser->setEmail($user->getEmail());
if ($user->isSuperAdmin()) {
$vanillaUser->setRoles([VanillaUser::ROLE_MEMBER, VanillaUser::ROLE_ADMINISTRATOR]);
}
return $vanillaUser;
}
示例5: notifyLateEmployee
public function notifyLateEmployee(UserInterface $user, Schedule $schedule)
{
$supervisors = $user->getSupervisors();
foreach ($supervisors as $supervisor) {
$context = array('user' => $user, 'supervisor' => $supervisor, 'position' => $schedule->getPosition());
$this->dispatchMessage('OpenSkedgeBundle:Mailer:lateemployee_sup.txt.twig', $context, $this->parameters['senderEmail'], $supervisor->getEmail());
}
$context = array('user' => $user, 'position' => $schedule->getPosition());
$this->dispatchMessage('OpenSkedgeBundle:Mailer:lateemployee_emp.txt.twig', $context, $this->parameters['senderEmail'], $user->getEmail());
}
示例6: sendNewPasswordMail
/**
* Method to send a mail to the user that his account has been created
* or that his password has been reset.
*
* @param UserInterface $user
* @param boolean $isReset
*/
public function sendNewPasswordMail(UserInterface $user, $isReset = false)
{
$applicationName = $this->options['applicationName'];
$subject = '[' . ($applicationName !== null && $applicationName != 'OPIT-HRM' ? $applicationName : 'OPIT-HRM') . '] - New account created';
$template = 'newAccount';
if ($isReset) {
$subject = '[' . ($applicationName !== null && $applicationName != 'OPIT-HRM' ? $applicationName : 'OPIT-HRM') . '] - Password reset';
$template = 'passwordReset';
}
$this->mail->setRecipient($user->getEmail());
$this->mail->setSubject($subject);
$this->mail->setBodyByTemplate('OpitOpitHrmUserBundle:Mail:' . $template . '.html.twig', array('password' => $this->password, 'user' => $user));
$this->mail->sendMail();
}
示例7: equals
public function equals(UserInterface $user)
{
if (!$user instanceof LdapUser) {
return false;
}
if ($user->getUsername() !== $this->username) {
return false;
}
if ($user->getEmail() !== $this->email) {
return false;
}
if ($user->getRoles() !== $this->roles) {
return false;
}
if ($user->getDn() !== $this->dn) {
return false;
}
return true;
}
示例8: sendPaymentRequest
public function sendPaymentRequest(PaymentRequest $paymentRequest, UserInterface $user)
{
$message = $this->createMessage($paymentRequest->getTitle(), $user->getEmail(), 'CivixCoreBundle:Email:payment_request.html.twig', ['paymentRequest' => $paymentRequest, 'user' => $user, 'domain' => $this->domain]);
$this->mailer->send($message);
}
示例9: isEqualTo
public function isEqualTo(UserInterface $user)
{
return $this->email === $user->getEmail();
}
示例10: isEqualTo
/**
* @inheritDoc
*/
public function isEqualTo(UserInterface $user)
{
if (!$user instanceof User) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->username !== $user->getUsername()) {
return false;
}
if ($this->email !== $user->getEmail()) {
return false;
}
return true;
}
示例11: equals
/**
* Método requerido por la interfaz UserInterface
*/
function equals(\Symfony\Component\Security\Core\User\UserInterface $usuario)
{
return $this->getEmail() == $usuario->getEmail();
}
示例12: getEmail
/**
* Returns the users email or as a fallback the installation-email-adress.
*
* @param UserInterface $user
*
* @return string
*/
private function getEmail(UserInterface $user)
{
if ($user->getEmail() !== null) {
return $user->getEmail();
}
return $this->container->getParameter('sulu_admin.email');
}
示例13: equals
/**
* @param UserInterface $user
* @return Boolean
*/
function equals(UserInterface $user)
{
if (!$user instanceof User) {
return false;
}
if ($this->email !== $user->getEmail()) {
return false;
}
if ($this->password !== $user->getPassword()) {
return false;
}
if ($this->getSalt() !== $user->getSalt()) {
return false;
}
return true;
}
示例14: equals
/**
* equals.
*
* @param UserInterface $account
* @return bool
*/
public function equals(\Symfony\Component\Security\Core\User\UserInterface $account)
{
if ($account->getUsername() != $this->getUsername()) {
return false;
}
if ($account->getEmail() != $this->getEmail()) {
return false;
}
return true;
}
示例15: equals
/**
* equals.
*
* @param UserInterface $account
* @return bool
*/
public function equals(UserInterface $account)
{
if ($account->getUsername() != $this->getUsername()) {
return false;
}
if ($account->getEmail() != $this->getEmail()) {
return false;
}
return true;
}