summaryrefslogtreecommitdiffstats
path: root/app/class/user.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/user.class.php')
-rw-r--r--app/class/user.class.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/class/user.class.php b/app/class/user.class.php
index bd2e174..4f1bbfe 100644
--- a/app/class/user.class.php
+++ b/app/class/user.class.php
@@ -120,6 +120,17 @@ class User extends Object
$key = $this->getKey($password, $this->salt);
return $key == $this->key;
}
+
+ /*
+ * If a user has an alias set, display it instead of their username
+ */
+ function getDisplayName()
+ {
+ if ($this->alias != "")
+ return $this->alias;
+
+ return $this->name;
+ }
}
?>