public function logout()
 {
     Session::flush();
     Auth::logout();
     Session::flash('messages', ["Successfully logged out."]);
     return view('front.index');
 }
Beispiel #2
0
 public function logout()
 {
     Session::flush();
     Session::flash('message', 'You have successfully logged out of the system.');
     Session::flash('alert-class', 'alert-success');
     return Redirect::to('/');
 }
Beispiel #3
0
 public function logOut()
 {
     // Cerramos la sesión
     Auth::logout();
     Session::flush();
     // Destroy all sessions
     // Volvemos al login y mostramos un mensaje indicando que se cerró la sesión
     return Redirect::to('/')->with('error_message', 'Se ha cerrado sesión correctamente');
 }
Beispiel #4
0
 public static function logOut()
 {
     Session::forget("user_id");
     Session::forget("role");
     Session::forget("project_id_profile_u");
     Session::forget("superuser");
     Session::flush();
     Redirect::to('login')->send();
 }
 public function logout()
 {
     $user = Auth::user();
     if ($user == null) {
         return Redirect::back();
     }
     Auth::logout();
     Session::flush();
     return redirect('/');
 }
 public function postLogout()
 {
     // update last url visited
     //
     //$this->postUpdate();
     // destroy session cookies
     //
     Session::flush();
     return Response::make('SESSION_DESTROYED');
     //Auth::logout();
 }
Beispiel #7
0
 public function logout()
 {
     $callback = 'http://' . $_SERVER['HTTP_HOST'];
     $ajax = Request::input('ajax');
     if ($ajax) {
         Session::flush();
         Session::save();
         exit;
     }
     $sso_logout = env('SSO_LOGOUT') . '?callback=' . $callback;
     header('Location:' . $sso_logout);
     exit;
 }
Beispiel #8
0
 public function testMetaDataStorage()
 {
     include 'source/helper.php';
     $meta = laravel_ab_meta();
     Session::forget(config('laravel-ab.cache_key'));
     Session::flush();
     $ab = app()->make('Ab');
     $ab->forceReset();
     Ab::saveSession();
     $instance = Instance::where(['instance' => Ab::getSession()->instance])->get()->first();
     $metadata = $instance->metadata;
     $this->assertTrue(is_array($metadata));
     $this->assertEquals($metadata, $meta);
 }
Beispiel #9
0
 public function anyLogout()
 {
     $callback = Request::input('callback');
     $uid = Session::get('uid');
     Session::flush();
     Session::save();
     $domain = $this->authModel->authorized_app_domain($uid);
     $app = '';
     if (is_array($domain)) {
         $app = implode('|', $domain);
     }
     $data['app'] = $app;
     $data['landing'] = $callback;
     return view('api.sso.logout', $data);
 }
 public function init(Request $request)
 {
     \Illuminate\Support\Facades\Session::flush();
     $session = new Session();
     $session->CreateTime = time();
     $session->save();
     $departments = Department::where('Type', 'execution')->orderBy('ID', 'ASC')->get();
     $retDepartments = [];
     for ($i = 0, $l = count($departments); $i < $l; $i++) {
         $retDepartments[] = $departments[$i]->toObject();
     }
     $categories = Category::orderBy('ID', 'ASC')->get();
     $retCategories = [];
     for ($i = 0, $l = count($categories); $i < $l; $i++) {
         $retCategories[] = $categories[$i]->toObject();
     }
     return view('index', ['sessionId' => $session->id, 'categories' => $retCategories, 'departments' => $retDepartments]);
 }
 /**
  *
  * Only Checks for the role of a user
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     // IF THERE IS NO ROLE SESSION
     if (!Session::get('ROLE.' . Auth::id())) {
         $activeUser = Auth::user()->active;
         if ($activeUser) {
             /*
              * GATHER ALL INFO ABOUT THE USER WITHIN THE CACHE
              * */
             $this->dispatch(new CollectCacheDataForAuthUser($request));
             return $next($request);
         }
         // IN CASE THE USER IS NOT ACTIVE
         Cache::forget('ROLE.' . Auth::id());
         Cache::forget('MODULES.' . Auth::id());
         Cache::forget('ABILITIES.' . Auth::id());
         Session::flush();
         Auth::logout();
         return $next($request);
     }
     return $next($request);
 }
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getCompanyLogout()
 {
     Auth::travel_company_staff()->logout();
     Session::flush();
     return redirect()->route('company_login');
 }
 function logout()
 {
     Auth::logout();
     Session::flush();
     return Redirect::to('/work');
 }
Beispiel #14
0
 public static function SessionFlush()
 {
     Session::flush();
 }
Beispiel #15
0
 /**
  *
  */
 public function doLogout()
 {
     Session::flush();
     return Redirect::to('admin/auth/login');
     // redirect the user to the login screen
 }
 public function getLogout(Request $request, DataGrabberInterface $dataGrabber)
 {
     $cookie = $request->cookie('x-access-token');
     $redirect = Redirect::to(url($this->redirectAfterLogout));
     try {
         $this->authService->logout();
         $logoutResult = (array) $dataGrabber->getFromJson(url(env('AUTH_LOGOUT')), [CURLOPT_COOKIE => 'x-access-token=' . $cookie]);
     } catch (AuthException $e) {
         $redirect = Redirect::to(url(env('AUTH_LOGOUT')))->withCookie('x-access-token', url(env('APP_PREFIX', '') . '/'));
     } catch (RemoteDataGrabberException $e) {
         $redirect = Redirect::to(url(env('AUTH_LOGOUT')))->withCookie('x-access-token', url(env('APP_PREFIX', '') . '/'));
     }
     Session::flush();
     // I don't know if this is neccesary
     return $redirect;
     // Use in case of ajax query and redirecting from the front-end
     //return Response::json($logoutResult, 200, null, JSON_NUMERIC_CHECK);
 }
 public function order(Request $request)
 {
     $customer = Customer::where('email', '=', $request->email)->first();
     if (empty($customer)) {
         Session::flash('message', 'Désolé, cet email n\'apparait pas dans notre BDD.');
         return redirect()->back();
     }
     if (Hash::check($request->password, $customer->password)) {
         $history = new History();
         $history->customer_id = $customer->id;
         $history->total = $request->total;
         $history->save();
         Session::flush();
         Session::flash('message', 'Merci pour votre commande !');
         return redirect()->back();
     } else {
         Session::flash('message', 'Désolé, merci de vérifier votre mot de passe.');
         return redirect()->back();
     }
 }
Beispiel #18
0
 /**
  * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
  */
 public function getLogout()
 {
     $this->serviceRagnarok->forgetUserSession();
     Session::flush();
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
Beispiel #19
0
 public function checkLogout()
 {
     Session::flush();
     return redirect()->to('login');
 }
 public function getLogout()
 {
     Auth::logout();
     Session::flush();
     return redirect('/');
 }
Beispiel #21
0
 public function doActive($nameUser, $keyActive)
 {
     //progress string
     $name = preg_replace('/[^a-zA-Z0-9\\-_]/', '', $nameUser);
     $key = preg_replace('/[^a-zA-Z0-9\\-_]/', '', $keyActive);
     $user = User::where('name', $name)->where('key_active', $key);
     //do active, update key
     $user->update(['status' => User::ACTIVED_STATUS, 'key_active' => str_random(30)]);
     if (Authen::check()) {
         Session::flush();
         if (Cache::has('user')) {
             Cache::forget('user');
         }
     }
     //end active
     return redirect('active_success');
 }
Beispiel #22
0
 public function logout($params = false)
 {
     Session::flush();
     $aj = $this->app->url_manager->is_ajax();
     $redirect_after = isset($_GET['redirect']) ? $_GET['redirect'] : false;
     if ($redirect_after == false) {
         $redirect_after = isset($_GET['redirect_to']) ? $_GET['redirect_to'] : false;
     }
     if (isset($_COOKIE['editmode'])) {
         setcookie('editmode');
     }
     $this->app->event_manager->trigger('mw.user.logout', $params);
     if ($redirect_after == false and $aj == false) {
         if (isset($_SERVER["HTTP_REFERER"])) {
             return $this->app->url_manager->redirect($_SERVER["HTTP_REFERER"]);
         }
     }
     if ($redirect_after == true) {
         $redir = $redirect_after;
         // $redir = site_url($redirect_after);
         return $this->app->url_manager->redirect($redir);
     }
     return true;
 }
 public function logout()
 {
     Session::flush();
     return view('home');
 }
Beispiel #24
0
 public function getLogout()
 {
     Auth::logout();
     Session::flush();
     return Redirect::to('auth/login');
 }
 public function getLogout()
 {
     Session::flush();
     Auth::logout();
     return Redirect::to('/')->with('message', 'Your are now logged out!');
 }
Beispiel #26
0
 /**
  *
  */
 public function doLogout()
 {
     Session::flush();
     return redirect()->route('/teabreak/login');
 }
Beispiel #27
0
 public function logout()
 {
     Session::flush();
     return Redirect::to('/view_registration');
 }
 public function getLogoff()
 {
     Session::flush();
     return Redirect::to('login');
 }
 public function logout()
 {
     Session::flush();
     return Redirect::to('/login')->with('message', 'Successfully Logged out.');
 }
Beispiel #30
0
 public function getLogout()
 {
     Session::flush();
     return redirect('/user/login');
 }