public function release(UserView $user) { $filter = array("username", "=", $username); $users = UserIterator::loadBy($this->configuration, $filter, $this->database); if (count($users) != 1) { throw new AuthenticationException("Unknown user or wrong password"); } $user = $users[0]; if ($user->enabled === false) { throw new AuthenticationException("Account locked, please contact administrator."); } if ($user->getAuthentication()->getProvider()->release($user) !== true) { throw new AuthenticationException("Unknown user or wrong password"); } return true; }
public function getUsers() { $filter = array("authentication", "=", $this->id); return UserIterator::loadBy($this->configuration(), $filter, $this->database(), false); }
public static function loadByRole(Configuration $configuration, $id, EnhancedDatabase $database = null, $controller = false) { $iterator = new Iterator($configuration, $database, $controller); return $iterator->loadDataByRole($id); }
public function getUsers() { return UserIterator::loadByRole($this->configuration(), $this->id, $this->database(), false); }