[Web] Better mobileconfig handling
This commit is contained in:
@@ -5,8 +5,11 @@ if (empty($mailcow_hostname)) {
|
||||
exit();
|
||||
}
|
||||
if (!isset($_SESSION['mailcow_cc_role']) || $_SESSION['mailcow_cc_role'] != 'user') {
|
||||
header("Location: index.php");
|
||||
die("This page is only available to logged-in users, not admins.");
|
||||
session_destroy();
|
||||
// probably better than appending the whole current http query string
|
||||
$append_get = (isset($_GET['only_email'])) ? '&only_email' : '';
|
||||
header('Location: index.php?mobileconfig' . $append_get);
|
||||
die();
|
||||
}
|
||||
|
||||
error_reporting(0);
|
||||
|
Reference in New Issue
Block a user