logout()
public function logout(): void
Description
Logs out the current user by destroying their authentication token and clearing session and cookie data. Redirects to the login form for the user's level (determined by the active token), using the configured secret login word or numeric level ID. Falls back to the homepage only when no active session is found.
Parameters
This method takes no parameters.
Return Value
| Type | Description |
|---|---|
| void | Redirects to the homepage after logout. |