Created
October 16, 2013 20:37
-
-
Save jburns131/7014415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
... | |
public function logoutAttempt() | |
{ | |
$sql = new Db(); | |
$this->sessionAxis->start(); | |
$currentUser = new \Acms\Core\Entities\CurrentUser($this->sessionAxis); | |
$tableColumns = [ | |
'acms_id' => '', | |
'modified' => date("Y-m-d H:i:s", time()), | |
]; | |
$conditions = 'id = :id'; | |
$bind = ['id' => $currentUser->getId()]; | |
$sql->dbUpdate('users', $tableColumns, $conditions, $bind); | |
$this->sessionAxis->destroy(); | |
$cookieName = str_replace('.', '_', $_SERVER['SERVER_NAME']) . '_acms'; | |
setcookie($_SERVER['SERVER_NAME'] . '_acms', false, time() - 3600, '/', $_SERVER['SERVER_NAME']); | |
header('Location: ' . $this->basePath); | |
exit; | |
return false; | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment