| 12345678910111213141516171819202122232425262728293031 |
- <?php
- /**
- * File for the login action.
- *
- * Implements an action function to be called from the {@see Controller}.
- *
- * @category Action
- */
- /**
- * Logs the user out and redirects to the login page.
- *
- * Invalidates cookies and session variables.
- *
- * @return int 0.
- * @category Action
- * @global int The user id.
- */
- function action(){
- $GLOBALS["UID"] = null;
- setcookie("uid", null, time() - 3600);
- session_regenerate_id();
- $_SESSION['session'] = false;
- $_SESSION['name'] = "";
- $_SESSION['uid'] = "";
- header("Location: /");
- die();
- return 0;
- }
- ?>
|