]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
change how the user profile is fetched
authorEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 19:20:01 +0000 (15:20 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 19:20:01 +0000 (15:20 -0400)
darcs-hash:20080517192001-84dde-fa2b16b7aeacab52c7697e14182fc72d2022bfcc.gz

classes/User.php

index 945309638331ff8008db486ed7a1ba0045b94015..8986053c5870243314f36dabf28ced7983c560e7 100644 (file)
@@ -43,7 +43,13 @@ class User extends DB_DataObject
     ###END_AUTOCODE
        
        function getProfile() {
-               return Profile::staticGet($this->$id);
+               $profile = DB_DataObject::factory('profile');
+               $profile->id = $this->id;
+               if ($profile->find()) {
+                       $profile->fetch();
+                       return $profile;
+               }
+               return NULL;
        }
        
        function isSubscribed($other) {