summaryrefslogtreecommitdiff
path: root/modules/user/models
diff options
context:
space:
mode:
authorRomain LE DISEZ <romain.git@ledisez.net>2009-07-22 08:38:06 +0200
committerRomain LE DISEZ <romain.git@ledisez.net>2009-07-22 08:38:06 +0200
commit317b7b98c094386407251c2baf8f6e7c391c7bff (patch)
tree98898d791df3a10cf6f9c1c62fbce06d8c9a7de1 /modules/user/models
parent00b3ca82de3a4858745988943a46d07b1c0fd006 (diff)
parentf533aee1cc71e8db739406859ac0cf43dce030ec (diff)
Merge commit 'upstream/master'
Diffstat (limited to 'modules/user/models')
-rw-r--r--modules/user/models/user.php9
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