getUserByEmail() public méthode

public getUserByEmail ( $userEmail )
Exemple #1
0
 /**
  * Returns the first login name of an existing user that has the given email address. If no user can be found for
  * this user an error will be returned.
  *
  * @param string $userEmail
  * @return bool true if the user is known
  */
 public function getUserLoginFromUserEmail($userEmail)
 {
     Piwik::checkUserIsNotAnonymous();
     Piwik::checkUserHasSomeAdminAccess();
     $this->checkUserEmailExists($userEmail);
     $user = $this->model->getUserByEmail($userEmail);
     // any user with some admin access is allowed to find any user by email, no need to filter by access here
     return $user['login'];
 }
Exemple #2
0
 /**
  * Returns the user information (login, password md5, alias, email, date_registered, etc.)
  *
  * @param string $userEmail the user email
  *
  * @return array the user information
  */
 public function getUserByEmail($userEmail)
 {
     Piwik::checkUserHasSuperUserAccess();
     $this->checkUserEmailExists($userEmail);
     return $this->model->getUserByEmail($userEmail);
 }