Logging out now displays a message

This commit is contained in:
2017-09-07 16:17:26 +07:00
parent 23622bc5a8
commit ab8506882a
2 changed files with 12 additions and 13 deletions

View File

@@ -102,19 +102,9 @@ class Access extends \Core\Model
}
}
public function logout()
public function logout($id)
{
$id = \Core\Session::get('userid');
if ($this->update(
'user',
['status' => 0],
$id
)) {
\Core\Session::delete('userid');
\Core\Session::delete('username');
\Core\Session::delete('full_name');
\Core\Session::delete('privilage');
if ($this->update('user', ['status' => 0], $id)) {
return true;
}
return false;