Ejemplo n.º 1
0
 /**
  * Loads a user for the given email
  *
  * Returns an array of Users since eZ Publish has under certain circumstances allowed
  * several users having same email in the past (by means of a configuration option).
  *
  * @param string $email
  *
  * @return \eZ\Publish\API\Repository\Values\User\User[]
  */
 public function loadUsersByEmail($email)
 {
     if (!is_string($email) || empty($email)) {
         throw new InvalidArgumentValue("email", $email);
     }
     $users = array();
     foreach ($this->userHandler->loadByEmail($email) as $spiUser) {
         $users[] = $this->buildDomainUserObject($spiUser);
     }
     return $users;
 }