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

@@ -96,7 +96,16 @@ class Home
public function logout()
{
if ($this->access->logout()) {
$user = Session::get('userid');
$username = Session::get('username');
if ($this->access->logout($user)) {
Session::flash('info', "$username has logged out");
Session::delete('userid');
Session::delete('username');
Session::delete('full_name');
Session::delete('privilage');
Redirect::to('/');
}
}