From 6bf823b4cf44d91d9c3cb1e799a900634aa6ff62 Mon Sep 17 00:00:00 2001 From: Harald Bamberger Date: Wed, 8 Oct 2025 17:32:23 +0200 Subject: [PATCH] return oe_kurzbz instead of array oe_kurzbz --- .../controllers/api/frontend/v1/ProfilUpdate.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/application/controllers/api/frontend/v1/ProfilUpdate.php b/application/controllers/api/frontend/v1/ProfilUpdate.php index e4eb4783e..cf0336bf7 100644 --- a/application/controllers/api/frontend/v1/ProfilUpdate.php +++ b/application/controllers/api/frontend/v1/ProfilUpdate.php @@ -356,6 +356,7 @@ class ProfilUpdate extends FHCAPI_Controller //? check if the permissions are set correctly + $this->addMeta('bhstudoe', $this->getOE_from_student($uid)); if ( $is_student && $this->permissionlib->isBerechtigt('student/stammdaten', "suid", $this->getOE_from_student($uid)) || $is_mitarbeiter && $this->permissionlib->isBerechtigt('mitarbeiter/stammdaten', "suid") @@ -776,13 +777,8 @@ class ProfilUpdate extends FHCAPI_Controller $res = $this->StudentModel->execReadOnlyQuery($query, [$student_uid]); $res = $this->getDataOrTerminateWithError($res, $this->p->t('profilUpdate', 'profilUpdate_loadingOE_error')); - $res = array_map( - function ($item) { - return $item->oe_kurzbz; - }, - $res - ); - return $res; + $oe = ($res[0])->oe_kurzbz; + return $oe; } private function handleAdresse($requested_change, $personID)