public function getUser($login) { if ($this->userLogin == 'NONE') { return false; } if (strlen($login)==0) { return new AnonymousUser(); } if ($userData = $this->getUserData($login)) { $user = new BasicUser($this); $user->setUserID($userData['userID']); $user->setEmail($userData['email']); $user->setFullName($userData['fullname']); return $user; } else { return false; return AUTH_USER_NOT_FOUND; // not sure which one is correct yet } }