Check that user is an active employee in message-cronjob

Signed-off-by: Cris <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2020-06-04 11:33:58 +02:00
parent 8304b4a1ae
commit 742c9fa857
+2 -1
View File
@@ -467,8 +467,9 @@ class Messages_model extends CI_Model
$prestudentsData = $this->PrestudentModel->getOrganisationunits($prestudents);
// Get the senders uid
// Get the senders uid (if user is an active employee)
$this->BenutzerModel->addSelect('uid');
$this->BenutzerModel->addJoin('public.tbl_mitarbeiter ma', 'ma.mitarbeiter_uid = uid');
if (!$result = getData($this->BenutzerModel->getFromPersonId($sender_id)))
{
show_error('No sender_uid found');