Skip to content
Snippets Groups Projects
Commit 7ee33545 authored by Bitha17's avatar Bitha17
Browse files

add logout

parent 30bfad21
Branches sementara
No related merge requests found
...@@ -55,5 +55,14 @@ class UserController { ...@@ -55,5 +55,14 @@ class UserController {
} }
} }
public function logout() {
session_start();
if (isset($_SESSION["user_id"])) {
unset($_SESSION["user_id"]);
session_destroy();
}
}
} }
?> ?>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment