]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/User_group.php
Merge request from chimo adding getvaliddaemons to stopdaemons.php
[quix0rs-gnu-social.git] / classes / User_group.php
index a9dfacd49811a3541a257cd276d986795d6c2d7b..aad38b635885540a29bf2b63e3b4b330744172b1 100644 (file)
@@ -84,17 +84,18 @@ class User_group extends Managed_DataObject
     public function getProfile()
     {
         if (!isset($this->_profile[$this->profile_id])) {
-            $this->_setProfile(Profile::getKV('id', $this->profile_id));
+            $profile = Profile::getKV('id', $this->profile_id);
+            if (!$profile instanceof Profile) {
+                throw new GroupNoProfileException($this);
+            }
+            $this->_profile[$this->profile_id] = $profile;
         }
         return $this->_profile[$this->profile_id];
     }
 
-    public function _setProfile(Profile $profile=null)
+    public function getNickname()
     {
-        if (!$profile instanceof Profile) {
-            throw new GroupNoProfileException($this);
-        }
-        $this->_profile[$this->profile_id] = $profile;
+        return $this->getProfile()->getNickname();
     }
 
     public static function defaultLogo($size)