Fixes names retrieval for accounts without profiles.
authorStéphane Jacob <sj@m4x.org>
Mon, 24 Oct 2011 13:37:06 +0000 (15:37 +0200)
committerStéphane Jacob <sj@m4x.org>
Mon, 24 Oct 2011 13:37:06 +0000 (15:37 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/user.php

index 3aea2fc..bc9adc5 100644 (file)
@@ -306,7 +306,7 @@ class User extends PlUser
     public function firstName()
     {
         if (!$this->hasProfile()) {
-            return $this->displayName();
+            return $this->firstname;
         }
         return $this->profile()->firstName();
     }
@@ -314,7 +314,7 @@ class User extends PlUser
     public function lastName()
     {
         if (!$this->hasProfile()) {
-            return '';
+            return $this->lastname;
         }
         return $this->profile()->lastName();
     }