/** * Get the truncated email displayed when requesting the resetting. * * The default implementation only keeps the part following @ in the address. * * @param \FOS\UserBundle\Model\UserInterface $user * * @return string */ protected function getObfuscatedEmail(User $user) { $email = $user->getEmail(); if (false !== ($pos = strpos($email, '@'))) { $email = '...' . substr($email, $pos); } return $email; }
/** * Is the given User the author of this Post? * * @param User $user * * @return bool */ public function isAuthor(User $user = null) { return $user->getEmail() == $this->getAuthorEmail(); }
/** * {@inheritDoc} */ public function getEmail() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getEmail', array()); return parent::getEmail(); }