]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Implement a User_group fetching function for Local_group
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 2 Nov 2013 16:27:50 +0000 (17:27 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 2 Nov 2013 16:27:50 +0000 (17:27 +0100)
classes/Local_group.php

index 95182a7c8f4a2b81665d0321fc4272fa9a9fc2dd..c0dcf02e4be3e86b7f5a14fe15cf1bd677575322 100644 (file)
@@ -40,13 +40,18 @@ class Local_group extends Managed_DataObject
 
     public function getProfile()
     {
-        $group = User_group::getKV('id', $this->group_id);
-        if (!($group instanceof User_group)) {
+        $group = $this->getGroup();
+        if (!$group instanceof User_group) {
             return null;    // TODO: Throw exception when other code is ready
         }
         return $group->getProfile();
     }
 
+    public function getGroup()
+    {
+        return User_group::getKV('id', $this->group_id);
+    }
+
     function setNickname($nickname)
     {
         $this->decache();