mirror of
https://github.com/BeitDina/AutoIndex.git
synced 2026-07-06 07:18:08 +02:00
Update User.php and function logout() to redirect at index
This commit is contained in:
committed by
GitHub
parent
79ad9d8c05
commit
ad5bfabbf6
@@ -77,6 +77,12 @@ class User
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
global $request, $config;
|
||||
$autoindex_u = empty($request->server('PHP_SELF')) ? $config->__get('base_dir') : $request->server('PHP_SELF');
|
||||
$autoindex_a = str_replace(array('&logout=true', '&logout=true'), array('', ''), $autoindex_u);
|
||||
|
||||
$home = new Url(Url::html_output($autoindex_a), true);
|
||||
$home->redirect();
|
||||
throw new ExceptionDisplay('You are not logged in.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user