Skip to content

Commit 1f3692e

Browse files
author
Kristan Kenney
committed
Detect correct landing point depending on package settings
1 parent 0c19266 commit 1f3692e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

web/login/index.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,21 @@ function authenticate_user($user, $password, $twofa = ''){
153153
if ($_SESSION['userContext'] === 'admin') {
154154
header("Location: /list/user/");
155155
} else {
156-
header("Location: /list/web/");
156+
if($data[$user]['WEB_DOMAINS'] != "0") {
157+
header("Location: /list/web/");
158+
} else if ($data[$user]['DNS_DOMAINS'] != "0") {
159+
header("Location: /list/dns/");
160+
} else if ($data[$user]['MAIL_DOMAINS'] != "0") {
161+
header("Location: /list/mail/");
162+
} else if ($data[$user]['DATABASES'] != "0") {
163+
header("Location: /list/db/");
164+
} else if ($data[$user]['CRON_JOBS'] != "0") {
165+
header("Location: /list/cron/");
166+
} else if ($data[$user]['BACKUPS'] != "0") {
167+
header("Location: /list/backup/");
168+
} else {
169+
header("Location: /list/web/");
170+
}
157171
}
158172
exit;
159173
}

0 commit comments

Comments
 (0)