mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 18:02:18 +00:00
Anrechnungen - Fixed Details Page for People with multiple Accounts
This commit is contained in:
@@ -13,27 +13,6 @@ 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
|
||||
|
||||
@@ -45,4 +45,25 @@ class Student_model extends DB_Model
|
||||
$max += 1;
|
||||
return $matrikelnummer.sprintf("%03d", $max);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get students UID by PrestudentID.
|
||||
* @param $prestudent_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function getUID($prestudent_id)
|
||||
{
|
||||
$this->addSelect('student_uid');
|
||||
|
||||
$result = $this->loadWhere(
|
||||
array('prestudent_id' => $prestudent_id)
|
||||
);
|
||||
|
||||
if (!hasData($result))
|
||||
{
|
||||
show_error('Failed getting UID by prestudent_id');
|
||||
}
|
||||
|
||||
return $result->retval[0]->student_uid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user