From 1a298c7e46f1fd44027c71e652f361b4f7b8b4a4 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 18 Dec 2019 12:43:39 +0100 Subject: [PATCH] AuthLib->_createAuthObjByPerson now checks that the benutzer is active, and no more the person --- application/libraries/AuthLib.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/application/libraries/AuthLib.php b/application/libraries/AuthLib.php index b73b2c963..c5345a250 100644 --- a/application/libraries/AuthLib.php +++ b/application/libraries/AuthLib.php @@ -574,10 +574,11 @@ class AuthLib // Needed information $this->_ci->PersonModel->addSelect('person_id, vorname, nachname, uid'); - // Retrieves the uid if it is possible - $this->_ci->PersonModel->addJoin('public.tbl_benutzer', 'person_id', 'LEFT'); - - $queryParamsArray['tbl_person.aktiv'] = true; // only active users! + // Retrieves the uid if it is possible for active users + $this->_ci->PersonModel->addJoin( + '(SELECT uid, person_id FROM public.tbl_benutzer WHERE aktiv = TRUE) tb', 'person_id', + 'LEFT' + ); // Execute query with where clause $personResult = $this->_ci->PersonModel->loadWhere($queryParamsArray);