/** * Main Notes Form Controller */ public function mainController() { //get whos login $user_id = \Auth::user()->id; session_start(); session_regenerate_id(); if (!isset($_SESSION["timer"])) { $_SESSION["timer"] = time(); } if (time() - $_SESSION["timer"] > 20 * 60) { $user = User::find($user_id); Auth::logout($user); unset($_SESSION["timer"]); return view('auth.login')->with('timeout', "you been logout for inactivity"); } $fileErrors = $this->updateNotes($user_id); //initial queries $notes = Notes::where('user_id', '=', $user_id)->first()->mynotes; $tbd = Tbd::where('user_id', '=', $user_id)->first()->mytbd; $linksArray = \App\Websites::where('user_id', $user_id)->first()->mylink; $image = DB::table('myimages')->where('user_id', $user_id)->lists('myimage', 'id'); $website = explode(',', $linksArray); $_SESSION["timer"] = time(); return view('home', compact('notes', 'tbd', 'website', 'image', 'fileErrors')); }
/** * Log the user out of the application. * * @return \Illuminate\Http\Response */ public function home() { Auth::logout(); //return route('register'); //return "Hola"; return redirect(route('register')); }
/** * Log the user out of the application. * * @param Session $session * @return \Illuminate\Http\Response */ public function getLogout(Session $session) { event(new UserWasLoggedOut($session->getSession())); $session->setOffline(); Auth::logout(); return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/'); }
public function getLogout() { if (Auth::check()) { Auth::logout(); } return Redirect::to('index')->with('message', '你现在已经退出登录了!'); }
public function logout() { $seguranca = new DPRFSeguranca(config("PRF.siglaSistema"), config("PRF.producao")); $seguranca->auditoria(Auth::user()->cpf, "LOGOUT", "Logout", array()); Auth::logout(); return Redirect::to("/"); }
public function doLogout() { Auth::logout(); // log the user out of our application return Redirect::to('/'); // redirect the user to the login }
public function doLogout() { if (Auth::check()) { Auth::logout(); return redirect('/'); } }
/** * @return mixed */ public function filter() { if (!Auth::check() or !Auth::user()->is('admin')) { Auth::logout(); return Redirect::route('admin.login.index'); } }
/** * Create a new password controller instance. * * @return void */ public function __construct() { if (Auth::check()) { Auth::logout(); } $this->middleware('guest'); }
/** * 用户登出 */ public function logout() { if (Auth::check()) { Auth::logout(); } return Redirect::route('login'); }
public function logout() { if (Auth::check()) { Auth::logout(); } return redirect('/')->with('message', '注销成功!'); }
/** * Logout the user * * @return Redirect */ public function getLogout() { //Logout the user Auth::logout(); //Redirect to login page return Redirect::to('admin/login')->with('success', Lang::get('firadmin::admin.messages.logout-success')); }
public function getLogout() { Auth::logout(); Session::flush(); return redirect('/admin/login'); //return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/'); }
public function postReset(PasswordResetRequest $request) { /* if($request['new_user'] == "" && $request['new_password'] == "") { return redirect()->route('user_reset'); } */ //$user = User::where('password', '=', bcrypt($request['password']))->count(); //$password = bcrypt($request['password']); $user = User::where('user', '=', $request['user'])->get(); if ($user->count()) { $userEdit = User::find($user[0]->id); if ($userEdit->id != Auth::user()->id) { $errors = array("0" => "Las credenciales no coinciden con el usuario autentificado actualmente!"); return $request->response($errors); } if ($request['new_user'] != "") { $userEdit->user = $request['new_user']; } if ($request['new_password'] != "") { $userEdit->password = bcrypt($request['new_password']); } $userEdit->save(); //***// Auth::logout(); return redirect()->route('login')->with('message', 'resetok'); } else { $errors = array("0" => "Usuario no identificado"); return $request->response($errors); } }
public function getLogout() { Auth::logout(); $this->login = false; $this->user = null; return "Volte a qualquer momento"; }
public function getLogout() { $employeeid = Auth::user()->id; $logs = ActivityLog::create(['employee_id' => $employeeid, 'activity' => 'User Logout', 'table_affected' => 'employee', 'primary_key' => $employeeid]); Auth::logout(); return redirect('/auth/login'); }
/** * Logs out a student from the system * @return \Illuminate\Http\RedirectResponse */ public function logout() { if (Auth::check()) { Auth::logout(); } return redirect()->to('/'); }
public function logout() { Auth::logout(); // logout user return \Redirect::to('admin/login'); //redirect back to login }
public function doLogout() { Auth::logout(); // log the user out of our application return redirect('login'); // redirect the user to the login screen }
public function postTargetlogin() { $rules = array('email' => 'required', 'password' => 'required'); $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { return redirect('targetmodule/targetlogin')->withErrors($validator); } else { $cred = array('email' => Input::get('email'), 'password' => Input::get('password')); $role = User::where('email', '=', Input::get('email'))->first(); if (Auth::attempt($cred) && $role->role == '') { if (Auth::check()) { Session::put('role', ''); Session::put('name', Auth::user()->name); return redirect('targetmodule/targethome'); } } else { if (Auth::attempt($cred) && $role->role == 'director') { if (Auth::check()) { Session::put('role', 'director'); Session::put('name', Auth::user()->name); return redirect('targetmodule/admin'); } } else { Session::flush(); Auth::logout(); return redirect('targetmodule/targetlogin')->with('login_errors', true); } } } }
/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @return mixed */ public function handle($request, Closure $next) { // print_r($request->all());die; // if ($this->auth->hasRole($role)) { // // } // return $next($request); // var_dump($this->auth->guest()); // die; if ($request->user()->report_login_active != 1) { // die('dvxcdvxcdvxcv '); // if ($this->auth->check()) { // return redirect('/admin/dashboard'); // } // } else { Auth::logout(); return redirect()->guest('/login'); } // if ($this->auth->user()) { // if ($request->ajax()) { // return response('Unauthorized.', 401); // } else { // return redirect()->guest('/admin/login'); // } // } // if ($this->auth->check()) { // return redirect('view'); // } return $next($request); }
private function checkStatusLevel() { if (!Auth::user()->isActiveStatus()) { Auth::logout(); throw new NoActiveAccountException(); } }
public function submit(Request $request) { //dd(bcrypt('123456')); //dd($request->all()); $user = $this->user; $this->validate($request, ['email' => 'required|email', 'password' => 'required|confirmed|min:6']); $input = $request->all(); $findUser = User::where('email', $input['email'])->first(); //dd($findUser); if ($findUser) { if ($findUser->id === $user->id) { //dd('ok'); $user->update(['password' => bcrypt($input['password'])]); Flash::success('گذرواژه با موفقیت تغییر کرد'); Auth::logout(); return redirect(route('xadmin.index')); } else { Flash::error('اطلاعات وارد شده صحیح نمی باشد'); return redirect(route('xadmin.index')); } } else { Flash::error('اطلاعات وارد شده صحیح نمی باشد'); return redirect()->back(); } }
/** * Log the user out of the application. * * @return \Illuminate\Http\Response */ public function getLogout() { // Log the user out. Auth::logout(); flash()->success('Success!', "You've been logged out!"); return redirect('/'); }
public function logout() { Auth::logout(); $rememberMeCookie = Auth::getRecallerName(); // Tell Laravel to forget this cookie $cookie = Cookie::forget($rememberMeCookie); return Redirect::to('/')->withCookie($cookie); }
public function getLogout() { Auth::logout(); if (Auth::check()) { return 'Logado'; } return 'Não está logado'; }
public function attempt(Request $request) { if ($request->ajax()) { Auth::logout(); $response = array('status' => 'success'); } return Response::json($response); }
public function getLogout(Request $request) { if (!is_null($request->session('admin'))) { $request->session()->pull('admin'); } Auth::logout(); return Redirect::to('/'); }
/** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * * @return mixed */ public function handle(Request $request, Closure $next) { if (Auth::check() && Auth::user()->isAdmin()) { return $next($request); } Auth::logout(); return redirect()->guest('/admin/login'); }
public function logout() { Cache::forget('role_id'); Cache::forget('this_user'); Logs::add('process', trans('whole::http/controllers.auth_log_3')); Auth::logout(); return redirect()->route('master_page'); }