/** * {@inheritDoc} */ public function register(array $credentials, $activate = false) { if ($guest = $this->findGuestUserByCredentials($credentials)) { return $this->convertGuestToUser($guest, $credentials, $activate); } return parent::register($credentials, $activate); }
/** * Checks for a supplied user or uses the default logged in. You should override this method. * @param mixed $user An optional back-end user object. * @return User object */ public function resolveUser($user) { $user = Manager::instance()->getUser(); if (!$user) { throw new AuthException('User is not logged in'); } return $user; }
public function init() { $this->useThrottle = UserSettings::get('use_throttle', $this->useThrottle); $this->requireActivation = UserSettings::get('require_activation', $this->requireActivation); parent::init(); }
/** * Get the currently authenticated user. * * @return \October\Rain\Auth\Models\User */ public function user() { return $this->october->getUser(); }