public function actionSignOut() { if (Gbox::$components->user->isGuest) { return $this->redirect('@web'); } $model = new FormAccountSignIn(); $model->logout(); Session::destroy('_business_id'); return $this->redirect('@web', ['action' => 'signout']); }
$this->title = 'Gbox Framework'; } if (!$this->description) { $this->description = 'Descripción de Gbox Framework'; } SiteAssets::register($this); ?> <!DOCTYPE html> <html> <head> <?php echo $this->renderHead(); ?> </head> <body> <?php echo AppMenu::Show(); ?> <div class="container"> <?php if ($response = Session::get('response')) { echo Bootstrap::Alert($response['msg'], array_key_exists('type', $response) ? $response['type'] : 'danger', true); Session::destroy('response'); } ?> <?php echo $content; ?> </div> </body> </html>
public function logout() { $this->_identity = null; $this->isGuest = false; $this->id = null; Session::destroy('__' . $this->alias()); Session::destroy('__' . $this->alias() . '_auth_key'); Gbox::getResponse()->getCookies()->remove('__' . $this->alias()); Gbox::getResponse()->getCookies()->remove('__' . $this->alias() . '_auth_key'); return true; }