change how the user profile is fetched

darcs-hash:20080517192001-84dde-fa2b16b7aeacab52c7697e14182fc72d2022bfcc.gz
This commit is contained in:
Evan Prodromou 2008-05-17 15:20:01 -04:00
parent 5bf2853b60
commit 95717c2b16

View File

@ -43,7 +43,13 @@ class User extends DB_DataObject
###END_AUTOCODE ###END_AUTOCODE
function getProfile() { 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) { function isSubscribed($other) {