Skip to content
Snippets Groups Projects
Verified Commit 41966589 authored by Damien's avatar Damien
Browse files

FEAT #12070 TIME 0:15 Basic authentication is only possible when connection is standard

parent c57e5876
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,15 @@ class AuthenticationController
$userId = null;
if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
if (AuthenticationModel::authentication(['userId' => $_SERVER['PHP_AUTH_USER'], 'password' => $_SERVER['PHP_AUTH_PW']])) {
$userId = $_SERVER['PHP_AUTH_USER'];
$loginMethod = CoreConfigModel::getLoggingMethod();
if ($loginMethod['id'] != 'standard') {
$user = UserModel::getByLogin(['select' => ['loginmode'], 'userId' => $_SERVER['PHP_AUTH_USER']]);
if ($user['loginmode'] == 'restMode') {
$userId = $_SERVER['PHP_AUTH_USER'];
}
} else {
$userId = $_SERVER['PHP_AUTH_USER'];
}
}
} else {
$cookie = AuthenticationModel::getCookieAuth();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment