/** * Log the given user ID into the application without sessions or cookies. * * @param mixed $id * @return bool */ public function onceUsingId($id) { if (!is_null($user = $this->provider->retrieveById($id))) { $this->setUser($user); return true; } return false; }
public function retrieveById($identifier) { // if provider is set, grab from there if ($this->isUsingProvider()) { $user = $this->provider->retrieveById($identifier); if ($user !== null || $this->userMustExistInProvider) { return $user; } } // else grab from LDAP return $this->ldapServer->retrieveByUsername($identifier); }
/** * Log the given user ID into the application without sessions or cookies. * * @param mixed $id * @return bool */ public function onceUsingId($id) { $this->setUser($this->provider->retrieveById($id)); return $this->user instanceof UserContract; }