adasdas
This commit is contained in:
@@ -20,7 +20,10 @@ if ($auth->isAuthenticated()) {
|
||||
|
||||
if (!($accountCheck['allowed'] ?? false)) {
|
||||
$auth->logout();
|
||||
header('Location: /auth/inactive/?message=' . urlencode((string) ($accountCheck['message'] ?? 'Dieses Konto ist noch nicht freigeschaltet.')), true, 302);
|
||||
$target = (string) ($accountCheck['state'] ?? '') === 'pending'
|
||||
? '/auth/pending/?username=' . urlencode((string) ($currentUser['username'] ?? ''))
|
||||
: '/auth/inactive/?message=' . urlencode((string) ($accountCheck['message'] ?? 'Dieses Konto ist noch nicht freigeschaltet.'));
|
||||
header('Location: ' . $target, true, 302);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user