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


PHP Sentry::logout方法代码示例

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


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

示例1: logout

 public function logout()
 {
     if (Sentry::check()) {
         Sentry::logout();
     }
     return Redirect::to('/');
 }
开发者ID:noubodi,项目名称:pretexts,代码行数:7,代码来源:SentryController.php

示例2: action_logout

 public function action_logout()
 {
     if (Sentry::check()) {
         Sentry::logout();
         echo json_encode(array('status' => 'ok'));
     }
 }
开发者ID:quickpacket,项目名称:noclayer,代码行数:7,代码来源:ajax.php

示例3: logout

 public function logout()
 {
     //Logout User
     Sentry::logout();
     //Redirect user ke halaman Login
     return Redirect::to('/')->with('successMessage', 'Anda Berhasil logout.');
 }
开发者ID:albertxiao,项目名称:Koperasi,代码行数:7,代码来源:HomeController.php

示例4: getLogout

 public function getLogout()
 {
     if (Sentry::check()) {
         Sentry::logout();
         return Redirect::route('index');
     }
 }
开发者ID:minnb,项目名称:vitduct,代码行数:7,代码来源:AuthController.php

示例5: before

 public function before()
 {
     parent::before();
     // if user not connected and not on the login, 404 or session_up pages then redirect to login page
     if (Request::active()->action != 'login' && !Sentry::check() && Request::active()->action != '404' && Request::active()->action != 'session_up') {
         Session::set(array('redirect' => Request::active()->route->translation));
         Response::redirect('login');
     }
     $this->current_user = self::current_user();
     View::set_global('current_user', self::current_user());
     if (Sentry::check()) {
         // logout if banned
         if (Sentry::attempts($this->current_user->username)->get() == Sentry::attempts()->get_limit()) {
             Session::set_flash('Your account has been blocked');
             Sentry::logout();
             Response::redirect('login');
         }
     }
     View::set_global('site_title', 'IKON Backend');
     View::set_global('separator', '/');
     foreach (Model_Forms::find('all') as $k => $form) {
         $this->tables[$k]['cleanName'] = $form->cleanName;
         $this->tables[$k]['url'] = $form->url;
         $this->tables[$k]['table'] = $form->table;
     }
     View::set_global('tables', $this->tables);
 }
开发者ID:roine,项目名称:wawaw,代码行数:27,代码来源:base.php

示例6: logoutAction

 /**
  * @description if logged in will logout session and redirect to /index
  * @return void or redirects to login page
  */
 public function logoutAction()
 {
     if (Sentry::check()) {
         Sentry::logout();
         return $this->response->redirect('index');
     }
 }
开发者ID:webkitz,项目名称:phalcon-mailgun,代码行数:11,代码来源:ControllerBase.php

示例7: getLogout

 /**
  * Logout page.
  *
  * @return Redirect
  */
 public function getLogout()
 {
     // Log the user out
     Sentry::logout();
     // Redirect to the users page
     return Redirect::route('home')->with('flash_error', 'Good Bye !');
 }
开发者ID:marcianobarros20,项目名称:ncryptd,代码行数:12,代码来源:AuthController.php

示例8: destroy

 /**
  * Remove the specified session from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy()
 {
     if (!Sentry::getUser()) {
         return Redirect::route('sessions.create');
     }
     Sentry::logout();
     return Redirect::route('sessions.create');
 }
开发者ID:dynamicsystems,项目名称:TechTracker,代码行数:14,代码来源:SessionsController.php

示例9: logout

 public function logout()
 {
     try {
         Sentry::logout();
         $data = Citrus::response('success', 1);
     } catch (Exception $e) {
         $data = Citrus::response('error', $e);
     }
     return $data;
 }
开发者ID:hackGFS,项目名称:api,代码行数:10,代码来源:AuthController.php

示例10: action_logout

 public function action_logout()
 {
     if (Sentry::login()) {
         Session::set_flash('success', 'successfuly logged out');
         Sentry::logout();
     } else {
         Session::set_flash('warning', 'You\'re not logged in');
         Response::redirect('');
     }
 }
开发者ID:roine,项目名称:wawaw,代码行数:10,代码来源:admin.php

示例11: before

 public function before()
 {
     //remove all data from previus installation....
     Sentry::logout();
     Config::load('Sentry', true);
     Cookie::delete('sentry_rm');
     Session::delete(Config::get('sentry.session.user'));
     Session::delete(Config::get('sentry.session.provider'));
     parent::before();
 }
开发者ID:quickpacket,项目名称:noclayer,代码行数:10,代码来源:installbasic.php

示例12: setUp

 /**
  * Default preparation for each test
  */
 public function setUp()
 {
     parent::setUp();
     // Migrate database
     Artisan::call('migrate');
     // Do not send mails
     Mail::pretend(true);
     // To create test models
     Model::unguard();
     // Logout - just to be sure
     \Sentry::logout();
 }
开发者ID:rafaelvieiras,项目名称:connect,代码行数:15,代码来源:TestCase.php

示例13: testBasicUserTypes

 /**
  * Test the two basic user types
  *
  */
 public function testBasicUserTypes()
 {
     $this->assertTrue(Sentry::getUser() == NULL, 'User should not be logged in initially.');
     $admin = Sentry::findUserByLogin($this->adminEmail);
     $this->assertTrue($admin != NULL, 'Admin account not found.');
     $user = Sentry::findUserByLogin($this->userEmail);
     $this->assertTrue($user != NULL, 'User account not found.');
     Sentry::setUser($user);
     $this->assertTrue(Sentry::check(), 'User not logged in.');
     Sentry::setUser($admin);
     $this->assertTrue(Sentry::check(), 'Admin not logged in.');
     Sentry::logout();
 }
开发者ID:marmaray,项目名称:L4withSentry,代码行数:17,代码来源:UserControllerTest.php

示例14: doUserLogout

 public function doUserLogout()
 {
     Sentry::logout();
     return Response::json(array());
 }
开发者ID:OlesKashchenko,项目名称:SkillsProject2,代码行数:5,代码来源:UserCabinetController.php

示例15: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id = null)
 {
     Sentry::logout();
     return Redirect::intended('/');
 }
开发者ID:ArbindJain,项目名称:scrapkart,代码行数:11,代码来源:SessionsController.php


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