]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile.php
Code cleanup and enabling User object's etc. getUri()
[quix0rs-gnu-social.git] / classes / Profile.php
index 6adf059781ac3c933c263a8f9984da943dcbb47f..c40e0e0b17ccdada4a7e230b8210482cddc69072 100644 (file)
@@ -1389,6 +1389,11 @@ class Profile extends Managed_DataObject
         return $this->profileurl;
     }
 
+    public function getNickname()
+    {
+        return $this->nickname;
+    }
+
     /**
      * Returns the best URI for a profile. Plugins may override.
      *
@@ -1403,9 +1408,8 @@ class Profile extends Managed_DataObject
 
             // check for a local user first
             $user = User::getKV('id', $this->id);
-
-            if (!empty($user)) {
-                $uri = $user->uri;
+            if ($user instanceof User) {
+                $uri = $user->getUri();
             }
 
             Event::handle('EndGetProfileUri', array($this, &$uri));