Example #1
0
 public function action_logout()
 {
     if ($this->_auth->logout()) {
         $this->_message = __("Logout succeeded");
         $this->_user = NULL;
     } else {
         $this->_message = __("Couldn't logout");
     }
 }
 /**
  * anySignout
  * --------------------------------------------------
  * @return Signs out the user
  * --------------------------------------------------
  */
 public function anySignout()
 {
     /* Sign out the user */
     Auth::logout();
     /* Redirect and add bye message */
     return Redirect::route('dashboard.dashboard')->with('success', 'Good bye.');
 }
 public function logout()
 {
     Session::forget('ltime');
     Session::forget('sescode');
     Auth::logout();
     return Response::json(array('flash' => 'Logged Out !'));
 }
 public function getLogout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::to('/');
 }
 public function logout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::route('frontpage');
 }
 public function doLogout()
 {
     //Desconctamos al usuario
     Auth::logout();
     //Redireccionamos al inicio de la app con un mensaje
     return Redirect::to('/login')->with('msg-logout', 'Sesión finalizada correctamente.');
 }
 /**
  * Remove the specified resource from storage.
  * DELETE /sessions/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     if (!Auth::guest()) {
         Auth::logout();
     }
     return Redirect::to('/');
 }
 /**
  * Log user out of system.
  */
 public function logout()
 {
     Auth::logout();
     Session::flush();
     // Clear *ALL* session data!
     return Redirect::to('login')->with('message', 'You have logged out.');
 }
 public function postIndex()
 {
     if (Input::has('changepw')) {
         $rules = array('oldPass' => 'required', 'newPass1' => 'required|min:8', 'newPass2' => 'required|min:8|same:newPass1');
         $input = Input::all();
         $validator = Validator::make($input, $rules);
         if ($validator->fails()) {
             return Redirect::to('/account')->withErrors($validator);
         }
         $user = Auth::user();
         if (!Auth::validate(array('name' => $user->name, 'password' => $input['oldPass']))) {
             return Redirect::to('/account')->withErrors(array('message' => 'You have entered a wrong password.'));
         }
         $user->password = Hash::make($input['newPass2']);
         $user->save();
         return Redirect::to('/account');
     } elseif (Input::has('removeacc')) {
         $rules = array('remPass' => 'required|min:8');
         $input = Input::all();
         $validator = Validator::make($input, $rules);
         if ($validator->fails()) {
             return Redirect::to('/account')->withErrors($validator);
         }
         $user = Auth::user();
         if (!Auth::validate(array('name' => $user->name, 'password' => $input['oldPass']))) {
             return Redirect::to('/account')->withErrors(array('message' => 'You have entered a wrong password.'));
         }
         $user->delete();
         Auth::logout();
         return Redirect::to('/');
     }
 }
Example #10
0
 public function getLogout()
 {
     Auth::logout();
     Session::flush();
     // Redirect to homepage
     return Redirect::to('/')->with('success', 'You have been successfully logged out');
 }
Example #11
0
 public function doSignOut()
 {
     $categories = DB::table('categories')->select('name')->get();
     $lastPosts = DB::table('posts')->orderBy('id', "DESC")->limit(6)->get();
     Auth::logout();
     return Redirect::route("index")->with('results', ['categories' => $categories, 'lastPosts' => $lastPosts]);
 }
Example #12
0
 public function logout()
 {
     $data = [Auth::user()->full_name, Auth::user()->email, Auth::user()->tipo];
     Auth::logout();
     $this->setAuditoria('acceso', 'logout', $data);
     return Redirect::route('inicio');
 }
Example #13
0
 function getLogout()
 {
     Session::forget('username');
     Session::forget('password');
     Auth::logout();
     return Redirect::to('/login');
 }
 public function logout()
 {
     // OTURUMU SONLANDIRALIM
     Auth::logout();
     // KULLANICIYI SORULAR SAYFASINA YÖNLENDİRELİM
     return Redirect::route('allQuestions');
 }
 public function doLogout()
 {
     Auth::logout();
     // log the user out of our application
     return Redirect::to('login')->with('message', 'Logged out');
     // redirect the user to the login screen
 }
 public function profileSave()
 {
     $json_request = array('status' => FALSE, 'responseText' => '', 'redirectURL' => FALSE);
     $validator = Validator::make(Input::all(), Accounts::$update_rules);
     if ($validator->passes()) {
         $post = Input::all();
         if (self::accountUpdate($post)) {
             $result = self::crmAccountUpdate($post);
             if ($result === -1) {
                 Auth::logout();
                 $json_request['responseText'] = Config::get('api.message');
                 $json_request['redirectURL'] = pageurl('auth');
                 return Response::json($json_request, 200);
             }
             $json_request['redirectURL'] = URL::route('dashboard');
             $json_request['responseText'] = Lang::get('interface.DEFAULT.success_save');
             $json_request['status'] = TRUE;
         } else {
             $json_request['responseText'] = Lang::get('interface.DEFAULT.fail');
         }
     } else {
         $json_request['responseText'] = $validator->messages()->all();
     }
     if (Request::ajax()) {
         return Response::json($json_request, 200);
     } else {
         return Redirect::route('dashboard');
     }
 }
Example #17
0
    function changePassword()
    {
        $validator = new Validate();
        $validated = $validator->validateNewPassword();
        if ($validated->fails()) {
            return \View::make('accounts.password')->withErrors($validated);
        }
        if (\Auth::check()) {
            $hashed = \Hash::make(\Input::get('password'));
            $id = \Auth::user()->user_id;
            \DB::beginTransaction();
            try {
                $statement = \User::find($id);
                $statement->password = $hashed;
                $statement->save();
            } catch (ValidationException $e) {
                DB::rollback();
                throw $e;
            }
            \DB::commit();
            \Auth::logout();
            return \Redirect::to('admin/logout')->with('message', '<div class="alert alert-dismissible alert-success alert-link">
				<button type="button" class="close" data-dismiss="alert">×</button>
				Password changed. Please log in.
				</div>');
        }
        return \Redirect::to('admin')->with('message', '<div class="alert alert-dismissible alert-success alert-link">
		<button type="button" class="close" data-dismiss="alert">×</button>
		Password changed. Please log in.
		</div>');
    }
 public function logout()
 {
     $user = Auth::User();
     $users = $user['u_name'];
     Auth::logout();
     return Redirect::to('index')->with('out', "Goodbye,  Welcome Back again!!!!!!  " . $users . "  ");
 }
Example #19
0
 public function logOut()
 {
     // Cerramos la sesión
     Auth::logout();
     // Volvemos al login y mostramos un mensaje indicando que se cerro la sesión
     return Redirect::to('/login')->with('error_message', '¡Gracias por usar nuestra aplicación!');
 }
Example #20
0
 /**
  * Log the user out of the application.
  *
  * @return \Illuminate\Http\Response
  */
 public function getLogout()
 {
     $user = \Auth::user()->name;
     \Auth::logout();
     \Session::flash('flash_message', $user . ': You have been logged out.');
     return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
 }
Example #21
0
 public function doLogout()
 {
     Auth::logout();
     // log the user out of our application
     return Redirect::to('login');
     // redirect the user to the login screen
 }
 public function getLogout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::to('users/login')->with('message', '你现在已经退出登录了!');
 }
 public function getKeluar()
 {
     # Hapus session dan cookies admin
     Auth::logout();
     # Arahkan ke route 'index' dengan session 'pesan'.
     return Redirect::route('index')->withPesan('Anda telah keluar dari sistem.');
 }
 /**
  * Logout
  * @return Redirect
  */
 public function getLogout()
 {
     # Log out
     Auth::logout();
     # Send them to the homepage
     return Redirect::to('/');
 }
 public function getLogout()
 {
     // Log out
     Auth::logout();
     // Redirect to homepage
     return Redirect::to('')->with('success', 'You are logged out');
 }
 public function logout()
 {
     Auth::logout();
     Session::forget('management');
     $is_json = Input::get('method') == 'json';
     return $is_json ? Response::json(['success' => true]) : Redirect::to('/');
 }
 public function logOut()
 {
     if (Auth::check()) {
         Auth::logout();
         return Redirect::to('login')->with('mensaje_error', 'Sesión Cerrada con Exito');
     }
 }
 public function logout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::to('login');
 }
Example #29
0
 public function __construct()
 {
     // Asset::add('jquery.dropdown.css', 'css/jquery.dropdown.css');
     Asset::add('bootstrap', 'css/bootstrap.min.css');
     Asset::add('bootstrap-responsive', 'css/bootstrap-responsive.css');
     Asset::add('common', 'css/common.css');
     // Asset::add('style', 'css/style.css');
     Asset::add('fontawsome', 'css/fontawesome.css');
     Asset::add('flickcss', 'css/flick/jquery-ui-1.10.2.custom.css');
     Asset::add('jquery', 'js/jquery-1.9.1.js');
     Asset::add('jquery-migrate-1.1.1.js', 'js/jquery-migrate-1.1.1.js');
     Asset::add('bootstrap-js', 'js/bootstrap.js');
     Asset::add('jqueryui', 'js/jquery-ui-1.10.2.custom.min.js');
     Asset::add('jquery.tablesorter.js', 'js/jquery.tablesorter.js');
     Asset::add('jquery.tablesorter.pager.js', 'js/jquery.tablesorter.pager.js');
     // $files = glob("public/css/pikachoose/*.css", GLOB_BRACE);
     // foreach($files as $file)
     // {
     // 	Asset::add($file, substr($file, 7));
     // }
     if (Session::has('id') && Auth::check()) {
         $account = Account::find(Session::get('id'));
         if ($account->admin == 1) {
             Session::put('admin', '1');
         } else {
             Session::put('admin', '0');
         }
         if ($account->blocked == 1) {
             Session::put('alert', "Your account has been banned. Please contact the admin for more details");
             Session::forget('id');
             Auth::logout();
         } else {
         }
     }
 }
Example #30
0
File: auth.php Project: vano00/jobs
 public function action_logout()
 {
     \Auth::logout();
     // delete the remember-me cookie if present
     \Auth::dont_remember_me();
     \Response::redirect('/');
 }