Route::filter('xml', function () { Api::$type = 'xml'; }); Route::when('json', 'json'); Route::when('xml', 'xml'); Route::filter('checkuser', function () { if (Auth::check()) { DB::update('UPDATE users SET last_activity = ? WHERE id = ?', array(date('Y-m-d H:i:s', time()), Auth::user()->id)); if (!Request::ajax()) { Activity::log(array('contentID' => Confide::user()->id, 'contentType' => 'activity', 'description' => 'Page Loaded', 'details' => '<a href="' . $_SERVER['REQUEST_URI'] . '" target="_new" class="btn">link</a>', 'updated' => Confide::user()->id ? true : false)); } $value = Cache::remember('valid_user', '1', function () { return Auth::user()->confirmed != '1' ? true : false; }); if ($value) { Confide::logout(); return Redirect::to('suspended'); } } }); Route::filter('auth', function ($route, $request) { if (Auth::guest()) { Session::put('loginRedirect', Request::url()); return Redirect::to('user/login/'); } }); Route::filter('auth.basic', function () { return Auth::basic(); }); Route::filter('guest', function () { if (Auth::check()) {
/** * Log the user out of the application. * * @return Illuminate\Http\Response */ public function logout() { Confide::logout(); return Redirect::to('/'); }
/** * Log the user out of the application. * */ public function getLogout() { Confide::logout(); return Redirect::to('user/login'); }
/** * Log the user out of the application. * */ public function logout() { Confide::logout(); return Redirect::to('/')->with('clearGuestKey', true); }
/** * Log the user out of the application. * */ public function logout() { if (Auth::check()) { if (!Auth::user()->registered) { $account = Auth::user()->account; $account->forceDelete(); } } Session::forget('news_feed_id'); Session::forget('news_feed_message'); Confide::logout(); return Redirect::to('/')->with('clearGuestKey', true); }
/** * Log the user out of the application. * * @return Illuminate\Http\Response */ public function logout() { Confide::logout(); Cart::destroy(); return Redirect::to('store'); }
public function cancelAccount() { if ($reason = trim(Input::get('reason'))) { $email = Auth::user()->email; $name = Auth::user()->getDisplayName(); $data = ['text' => $reason]; $this->userMailer->sendTo(CONTACT_EMAIL, $email, $name, 'Invoice Ninja Feedback [Canceled Account]', 'contact', $data); } $account = Auth::user()->account; $account->forceDelete(); Confide::logout(); return Redirect::to('/')->with('clearGuestKey', true); }
/** * Log the user out of the application. * */ public function logout() { if (Auth::check()) { if (!Auth::user()->registered) { $account = Auth::user()->account; $account->forceDelete(); } } Confide::logout(); return Redirect::to('/')->with('clearGuestKey', true); }
/** * Log the user out of the application. * */ public function getLogout() { Event::fire('user.logout', array(Confide::user())); Activity::log(array('contentID' => Confide::user()->id, 'contentType' => 'logout', 'description' => Confide::user()->id, 'details' => '', 'updated' => Confide::user()->id)); Confide::logout(); return Redirect::to('/'); }
/** * Log the user out of the application. * */ public function getLogout() { Confide::logout(); try { // Logout all providers $socialAuth = new Hybrid_Auth(app_path() . '/config/hybridauth.php'); $socialAuth->logoutAllProviders(); } catch (Exception $err) { var_dump($err); } return Redirect::to('/'); }
public function logoutPOS() { if (Auth::check()) { if (!Auth::user()->registered) { $account = Auth::user()->account; $account->forceDelete(); } } Confide::logout(); $datos = array('saliendo XD' => '12321'); return Response::json($datos); // return Redirect::to('/')->with('clearGuestKey', true); }
public function getLogout() { $this->user->logout(); Confide::logout(); return Redirect::to('/'); }
/** * Log the user out of the application. * * @return Illuminate\Http\Response */ public function logout() { Confide::logout(); return Redirect::action('home'); }
/** * Log the user out of the application. * * @return Illuminate\Http\Response */ public function logout() { Confide::logout(); session_destroy(); return Redirect::to('/'); }
/** * Log the user out of the application. * */ public function getLogout() { Confide::logout(); try { // Logout all providers $socialAuth = new Hybrid_Auth(app_path() . '/config/hybridauth.php'); $socialAuth->logoutAllProviders(); } catch (Exception $err) { Log::error($err); return Redirect::to('/')->with('notice', $err->getMessage()); } return Redirect::to('/'); }