diff options
| author | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-22 08:38:06 +0200 |
|---|---|---|
| committer | Romain LE DISEZ <romain.git@ledisez.net> | 2009-07-22 08:38:06 +0200 |
| commit | 317b7b98c094386407251c2baf8f6e7c391c7bff (patch) | |
| tree | 98898d791df3a10cf6f9c1c62fbce06d8c9a7de1 /modules/user/models | |
| parent | 00b3ca82de3a4858745988943a46d07b1c0fd006 (diff) | |
| parent | f533aee1cc71e8db739406859ac0cf43dce030ec (diff) | |
Merge commit 'upstream/master'
Diffstat (limited to 'modules/user/models')
| -rw-r--r-- | modules/user/models/user.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/user/models/user.php b/modules/user/models/user.php index 0234f186..def65a6f 100644 --- a/modules/user/models/user.php +++ b/modules/user/models/user.php @@ -72,4 +72,13 @@ class User_Model extends ORM { } return $this; } + + /** + * Return the best version of the user's name. Either their specified full name, or fall back + * to the user name. + * @return string + */ + public function display_name() { + return empty($this->full_name) ? $this->name : $this->full_name; + } }
\ No newline at end of file |
