Anrechnungen - Fixed Details Page for People with multiple Accounts

This commit is contained in:
Andreas Österreicher
2021-02-15 21:12:14 +01:00
parent 4d81f91840
commit 3366f091dd
4 changed files with 168 additions and 168 deletions
+21
View File
@@ -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;
}
}