mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
token renames (a variable called SESSID_USERNAME makes me think it is reserved by PHP or something, which I do not think it actually is, so just user a more meaningful $username
This commit is contained in:
2 files changed
+4
-5
No files matched your search
+1
-2
@@ -54,8 +54,7 @@ function authentication_get_username()
|
||||
header("Location: login.php");
|
||||
exit(0);
|
||||
}
|
||||
$SESSID_USERNAME = $_SESSION['sessid']['username'];
|
||||
return $SESSID_USERNAME;
|
||||
return $_SESSION['sessid']['username'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -35,11 +35,11 @@ $smarty = PFASmarty::getInstance();
|
||||
|
||||
$PALANG = $CONF['__LANG'];
|
||||
|
||||
$SESSID_USERNAME = authentication_get_username();
|
||||
$username = authentication_get_username();
|
||||
if (authentication_has_role('global-admin')) {
|
||||
$list_domains = list_domains();
|
||||
} else {
|
||||
$list_domains = list_domains_for_admin($SESSID_USERNAME);
|
||||
$list_domains = list_domains_for_admin($username);
|
||||
}
|
||||
|
||||
$fDomain = '';
|
||||
@@ -83,7 +83,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") {
|
||||
die('Unknown request method');
|
||||
}
|
||||
|
||||
if (! (check_owner($SESSID_USERNAME, $fDomain) || authentication_has_role('global-admin'))) {
|
||||
if (! (check_owner($username, $fDomain) || authentication_has_role('global-admin'))) {
|
||||
$error = 1;
|
||||
flash_error($PALANG['pViewlog_result_error']);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user