userExists() public method

public userExists ( $userLogin )
Example #1
0
 /**
  * Returns true if the given userLogin is known in the database
  *
  * @param string $userLogin
  * @return bool true if the user is known
  */
 public function userExists($userLogin)
 {
     if ($userLogin == 'anonymous') {
         return true;
     }
     Piwik::checkUserIsNotAnonymous();
     Piwik::checkUserHasSomeViewAccess();
     if ($userLogin == Piwik::getCurrentUserLogin()) {
         return true;
     }
     return $this->model->userExists($userLogin);
 }