Added getUID() by prestudentID - method to Prestudent Model

Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2021-02-01 10:03:18 +01:00
committed by cris-technikum
parent 907ecca333
commit a218b36323
@@ -13,6 +13,27 @@ class Prestudent_model extends DB_Model
$this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel');
}
/**
* Get students UID by PrestudentID.
* @param $prestudent_id
* @return mixed
*/
public function getUID($prestudent_id)
{
$this->addSelect('uid');
$this->addJoin('public.tbl_person', 'person_id');
$this->addJoin('public.tbl_benutzer ', 'person_id');
$result = $this->load($prestudent_id);
if (!hasData($result))
{
show_error('Failed getting UID by prestudent_id');
}
return $result->retval[0]->uid;
}
/**
* getLastStatuses