/** * Chequea el codigo y redireciona segun el repo. * @param string $code el codigo en 32 caracteres. * @return \Illuminate\Http\RedirectResponse */ public function confirm($code) { if (!$code) { return Redirect::route('index'); } if (!$this->userRepo->confirmCode($code)) { return Redirect::route('index'); } $this->auth->logout(); Flash::success('Ud. ha verificado exitosamente su cuenta.'); return Redirect::route('auth.getLogin'); }
/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { if (!$this->auth->user()->isAdmin()) { $this->auth->logout(); if ($request->ajax()) { return response('Unauthorized.', 401); } else { return redirect()->to('auth/login'); } } return $next($request); }
/** * @return boolean */ public function logout() { $userInfoForEventTrigger = $this->auth->user(); $this->auth->logout(); \Event::fire(new LoggedOut($userInfoForEventTrigger)); return true; }
/** * Log the user out of the application. * * @return void * @static */ public static function logout() { \Illuminate\Auth\Guard::logout(); }
/** * Signs the user out. * * @param \Illuminate\Auth\Guard $auth * * @return \Illuminate\Http\RedirectResponse */ public function out(Guard $auth) { $auth->logout(); return redirect('/'); }
/** * Logout user from the app * * @return \Illuminate\Http\RedirectResponse */ public function doLogout() { $this->auth->logout(); return redirect()->route('home'); }
public function logout(Guard $auth) { $auth->logout(); return redirect()->route('auth.login'); }
/** * Log the user out of the application. * * @return void */ public function logout() { parent::logout(); }
/** * @param Guard $guard * * @return \Illuminate\Http\RedirectResponse */ public function logout(Guard $guard) { $guard->logout(); return redirect()->back(); }
/** * {@inheritdoc} */ public function logout() { parent::logout(); // We should flush the cached user roles relationship so any // subsequent request would re-validate all information, // instead of referring to the cached value. $this->userRoles = null; }
public function logout() { Session::forget($this->provider->getTokenName()); App::make('google-client')->revokeToken(); parent::logout(); }
public function logout() { $this->loalevel = 0; $this->session->set($this->getLoaName(), $this->loalevel); parent::logout(); }
public function logout() { $this->auth->logout(); return redirect('/'); }
/** * Log out the current user. * * @return void */ public function logout() { $this->auth->logout(); }
/** * Log the user out of the application. */ public function logout() { if ($this->check()) { parent::logout(); } }
/** * 执行退出登录操作 */ public function getLogout() { $this->auth->logout(); return $this->redirect('/admin/auth/login'); }