Added method getFullName() to Person_model

Signed-off-by: cris-technikum <hainberg@technikum-wien.at>
This commit is contained in:
Cris
2021-01-26 18:54:42 +01:00
committed by cris-technikum
parent db10f78505
commit 8a75bc9fdd
@@ -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);
}
}