X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fuser.php;h=6a3be3847b97db5f3001c48d815785a21bebadc4;hb=551e00c175feb8f3511c603f8871b70900f461ef;hp=4d4a28aedba438315a95f9cc546af6b4cfab32d8;hpb=20b087ff2e4bb918f601a9bcc2c67d1fbc5b2231;p=platal.git diff --git a/classes/user.php b/classes/user.php index 4d4a28a..6a3be38 100644 --- a/classes/user.php +++ b/classes/user.php @@ -327,11 +327,11 @@ class User extends PlUser /** Return the main profile attached with this account if any. */ - public function profile($forceFetch = false) + public function profile($forceFetch = false, $fields = 0x0000, $visibility = null) { if (!$this->_profile_fetched || $forceFetch) { $this->_profile_fetched = true; - $this->_profile = Profile::get($this); + $this->_profile = Profile::get($this, $fields, $visibility); } return $this->_profile; } @@ -813,7 +813,7 @@ class User extends PlUser XDB::execute('UPDATE log_last_sessions SET id = {?} WHERE uid = {?}', - $newuser->id()); + $lastSession, $newuser->id()); XDB::execute('DELETE FROM accounts WHERE uid = {?}', $this->id());