aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSebastian Schenk <sebastian.schenk@itz.uni-halle.de>2025-05-21 14:22:12 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-05-22 08:55:52 +0200
commit11c3d3ebe8726aa69edddd50eab9e54037603e0b (patch)
treea14ba3446bf0fdc8a7f24144cea97ca9f24383a0 /app
parent17419d248082ca4d35e0c72e3e20679c5e9b3f88 (diff)
switch order in authenticate, fixes #5622
Closes #5622 Merge request studip/studip!4236
Diffstat (limited to 'app')
-rw-r--r--app/controllers/ilias_auth.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/controllers/ilias_auth.php b/app/controllers/ilias_auth.php
index fd642dc..7f6f0a2 100644
--- a/app/controllers/ilias_auth.php
+++ b/app/controllers/ilias_auth.php
@@ -32,10 +32,6 @@ class IliasAuthController extends StudipController
public function authenticate_action()
{
$authenticated = false;
- $auth_status = StudipAuthAbstract::checkAuthentication(Request::get('login'), Request::get('password'));
- if ($auth_status['uid']) {
- $authenticated = true;
- }
$query = "SELECT external_user_token_valid_until FROM auth_extern WHERE external_user_name = ? AND external_user_token = ?";
$result = DBManager::get()->fetchOne($query, [Request::get('login'), Request::get('password')]);
if (count($result)) {
@@ -43,6 +39,12 @@ class IliasAuthController extends StudipController
$authenticated = true;
}
}
+ if (!$authenticated) {
+ $auth_status = StudipAuthAbstract::checkAuthentication(Request::get('login'), Request::get('password'));
+ if (!empty($auth_status['uid'])) {
+ $authenticated = true;
+ }
+ }
if ($authenticated) {
$this->render_text('authenticated');
} else {