- ⌂ User
- Methods
User::get_full_name()
Get the closest thing to a "full name" for a User based on which fields are defined.
Prototype
string get_full_name()
Return
A string based on the defined fields with the following preference:
- If a First Name and Last Name is defined, combine them, separated by a space.
- If only a First Name is defined, return it.
- If only a Last Name is defined, return it.
- If a Username is defined, return it.
- If an Email is defined, return it.
- If none of the above are defined, return an empty string.
Example
$users = $repo->get("FROM User WHERE Email!=''");
foreach($users as $user) {
echo($user->get_full_name() . "\n" );
}