当前位置: 首页>>代码示例>>PHP>>正文


PHP Auth::logout方法代码示例

本文整理汇总了PHP中Auth::logout方法的典型用法代码示例。如果您正苦于以下问题:PHP Auth::logout方法的具体用法?PHP Auth::logout怎么用?PHP Auth::logout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Auth的用法示例。


在下文中一共展示了Auth::logout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: action_logout

 public function action_logout()
 {
     if ($this->_auth->logout()) {
         $this->_message = __("Logout succeeded");
         $this->_user = NULL;
     } else {
         $this->_message = __("Couldn't logout");
     }
 }
开发者ID:ragchuck,项目名称:ra-Log,代码行数:9,代码来源:auth.php

示例2: anySignout

 /**
  * 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.');
 }
开发者ID:neraunzaran,项目名称:fruit-dashboard,代码行数:13,代码来源:AuthController.php

示例3: logout

 public function logout()
 {
     Session::forget('ltime');
     Session::forget('sescode');
     Auth::logout();
     return Response::json(array('flash' => 'Logged Out !'));
 }
开发者ID:rshewade,项目名称:laravel_angular,代码行数:7,代码来源:AuthController.php

示例4: getLogout

 public function getLogout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::to('/');
 }
开发者ID:EdgardoPitti,项目名称:plagetri21,代码行数:7,代码来源:AuthController.php

示例5: logout

 public function logout()
 {
     if (Auth::check()) {
         Auth::logout();
     }
     return Redirect::route('frontpage');
 }
开发者ID:Geekathon,项目名称:reddit-clone,代码行数:7,代码来源:UserController.php

示例6: doLogout

 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.');
 }
开发者ID:Badillo,项目名称:hospitalcatalina-web,代码行数:7,代码来源:AuthController.php

示例7: destroy

 /**
  * 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('/');
 }
开发者ID:udayrockstar,项目名称:RestaurantManager,代码行数:14,代码来源:SessionsController.php

示例8: logout

 /**
  * 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.');
 }
开发者ID:marciocamello,项目名称:laravel-ecommerce,代码行数:10,代码来源:CustomersController.php

示例9: postIndex

 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('/');
     }
 }
开发者ID:matrefeytontias,项目名称:ndless-apps,代码行数:32,代码来源:AccountController.php

示例10: getLogout

 public function getLogout()
 {
     Auth::logout();
     Session::flush();
     // Redirect to homepage
     return Redirect::to('/')->with('success', 'You have been successfully logged out');
 }
开发者ID:alexixim,项目名称:blood-bank,代码行数:7,代码来源:AuthController.php

示例11: doSignOut

 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]);
 }
开发者ID:NevDK91,项目名称:laravelBlog,代码行数:7,代码来源:UsersController.php

示例12: logout

 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');
 }
开发者ID:jogs78,项目名称:talleres,代码行数:7,代码来源:AuthController.php

示例13: getLogout

 function getLogout()
 {
     Session::forget('username');
     Session::forget('password');
     Auth::logout();
     return Redirect::to('/login');
 }
开发者ID:imranshuvo,项目名称:QuizzApps,代码行数:7,代码来源:LoginController.php

示例14: logout

 public function logout()
 {
     // OTURUMU SONLANDIRALIM
     Auth::logout();
     // KULLANICIYI SORULAR SAYFASINA YÖNLENDİRELİM
     return Redirect::route('allQuestions');
 }
开发者ID:burak-tekin,项目名称:laravel-ornek-uygulama,代码行数:7,代码来源:UserController.php

示例15: profileSave

 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');
     }
 }
开发者ID:Grapheme,项目名称:lipton,代码行数:29,代码来源:participant.controller.php


注:本文中的Auth::logout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。