change how the user profile is fetched
darcs-hash:20080517192001-84dde-fa2b16b7aeacab52c7697e14182fc72d2022bfcc.gz
This commit is contained in:
parent
5bf2853b60
commit
95717c2b16
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user