mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 23:42:17 +00:00
Fixed Query to get User for Messages by PersonID and OrganisationUnit
This commit is contained in:
@@ -23,14 +23,17 @@ class Benutzer_model extends DB_Model
|
||||
*/
|
||||
public function getActiveUserByPersonIdAndOrganisationUnit($person_id, $oe_kurzbz)
|
||||
{
|
||||
$sql = 'SELECT b.uid,
|
||||
b.insertamum
|
||||
FROM public.tbl_benutzer b
|
||||
JOIN public.tbl_prestudent ps USING (person_id)
|
||||
JOIN public.tbl_studiengang sg USING (studiengang_kz)
|
||||
WHERE ps.person_id = ?
|
||||
AND sg.oe_kurzbz = ?
|
||||
AND b.aktiv = TRUE';
|
||||
$sql = 'SELECT
|
||||
b.uid,
|
||||
b.insertamum
|
||||
FROM
|
||||
public.tbl_prestudent ps
|
||||
JOIN public.tbl_studiengang sg USING (studiengang_kz)
|
||||
JOIN public.tbl_student USING(prestudent_id)
|
||||
JOIN public.tbl_benutzer b ON(uid = student_uid)
|
||||
WHERE ps.person_id = ?
|
||||
AND sg.oe_kurzbz = ?
|
||||
AND b.aktiv = TRUE';
|
||||
|
||||
return $this->execQuery($sql, array($person_id, $oe_kurzbz));
|
||||
}
|
||||
@@ -98,4 +101,3 @@ class Benutzer_model extends DB_Model
|
||||
return mb_strtolower(str_replace(' ','_', $str));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user