mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-12 17:49:28 +00:00
Added method getFullName() to Person_model
Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
@@ -248,4 +248,19 @@ class Person_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry, $parametersArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get full name of given uid. (Vorname Nachname)
|
||||
* @param $uid
|
||||
* @return array
|
||||
*/
|
||||
public function getFullName($uid)
|
||||
{
|
||||
if (!$result = getData($this->getByUid($uid))[0])
|
||||
{
|
||||
show_error('Failed loading person');
|
||||
}
|
||||
|
||||
return success($result->vorname. ' '. $result->nachname);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user