aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/ilias_auth.php
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-21 16:22:12 +0200
commit5c108c4fa52813795fc70e6f7e167dbcbd25af1d (patch)
tree6815168a2f2978ed55a56db5c4ec68034a3dfeb1 /app/controllers/ilias_auth.php
parenta273776d001e32b214381d962e9d4250457a57c7 (diff)
switch order in authenticate, fixes #5622
Closes #5622 Merge request studip/studip!4236
Diffstat (limited to 'app/controllers/ilias_auth.php')
-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 {