/**
  * 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');
 }
Beispiel #2
0
 /**
  * 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;
 }
Beispiel #4
0
 /**
  * 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');
 }
Beispiel #8
0
 /**
  * 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();
 }
Beispiel #10
0
 /**
  * {@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();
 }
Beispiel #12
0
 public function logout()
 {
     $this->loalevel = 0;
     $this->session->set($this->getLoaName(), $this->loalevel);
     parent::logout();
 }
Beispiel #13
0
 public function logout()
 {
     $this->auth->logout();
     return redirect('/');
 }
Beispiel #14
0
 /**
  * Log out the current user.
  *
  * @return void
  */
 public function logout()
 {
     $this->auth->logout();
 }
Beispiel #15
0
 /**
  * Log the user out of the application.
  */
 public function logout()
 {
     if ($this->check()) {
         parent::logout();
     }
 }
Beispiel #16
0
 /**
  * 执行退出登录操作
  */
 public function getLogout()
 {
     $this->auth->logout();
     return $this->redirect('/admin/auth/login');
 }