add logout logic

This commit is contained in:
Usman Nasir
2020-08-13 11:09:43 +05:00
parent 2254c698a4
commit a284bf2eb2
3 changed files with 9 additions and 0 deletions

View File

@@ -688,6 +688,7 @@ $cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['auth_type'] = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
$cfg['Servers'][$i]['SignonURL'] = 'phpmyadminsignin.php';
$cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
"""
for items in data:

View File

@@ -19,6 +19,13 @@ if(isset($_GET['token'])){
header('Location: ' . $url);
}
else if(isset($_GET['logout'])){
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 86400, $params["path"], $params["domain"], $params["secure"], $params["httponly"] );
session_destroy();
header('Location: /dataBases/phpMyAdmin');
return;
}
else if(isset($_GET['password'])){
session_name(PMA_SIGNON_SESSIONNAME);

View File

@@ -235,6 +235,7 @@ $cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['auth_type'] = 'signon';
$cfg['Servers'][$i]['SignonSession'] = 'SignonSession';
$cfg['Servers'][$i]['SignonURL'] = 'phpmyadminsignin.php';
$cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
"""
for items in data: