mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Added getUID() by prestudentID - method to Prestudent Model
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user