1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-25 15:51:31 +00:00

[Web] Separate Login pages

This commit is contained in:
FreddleSpl0it
2025-01-27 15:59:50 +01:00
parent 1e70a20188
commit aca01c8aa2
29 changed files with 798 additions and 338 deletions

View File

@@ -99,15 +99,30 @@ if (isset($_POST["logout"])) {
unset($_SESSION['sogo-sso-user-allowed']);
unset($_SESSION['sogo-sso-pass']);
unset($_SESSION["dual-login"]);
header("Location: /mailbox");
if ($_SESSION["mailcow_cc_role"] == "admin"){
header("Location: /admin/mailbox");
} elseif ($_SESSION["mailcow_cc_role"] == "domainadmin") {
header("Location: /domainadmin/mailbox");
} else {
header("Location: /");
}
exit();
}
else {
$role = $_SESSION["mailcow_cc_role"];
session_regenerate_id(true);
session_unset();
session_destroy();
session_write_close();
header("Location: /");
if ($role == "admin") {
header("Location: /admin");
}
elseif ($role == "domainadmin") {
header("Location: /domainadmin");
}
else {
header("Location: /");
}
}
}