From: Raphaël Barrois Date: Fri, 27 Aug 2010 16:36:44 +0000 (+0200) Subject: Fix profile "refreshing" in NamesReq. X-Git-Tag: xorg/1.0.1~15^2~17 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=14da7ef42a1415fe0b58ae5d7766e6d79ab7a27b;p=platal.git Fix profile "refreshing" in NamesReq. Also fixes User->getLogin($login) with login being a uid. Signed-off-by: Raphaël Barrois --- diff --git a/classes/user.php b/classes/user.php index f7f90fa..f888865 100644 --- a/classes/user.php +++ b/classes/user.php @@ -37,7 +37,7 @@ class User extends PlUser } if ($login instanceof User) { - $machin->id(); + return $login->id(); } if ($login instanceof Profile) { diff --git a/include/validations/names.inc.php b/include/validations/names.inc.php index 08fd85b..4c33f84 100644 --- a/include/validations/names.inc.php +++ b/include/validations/names.inc.php @@ -19,7 +19,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -// {{{ class NamesReq4 +// {{{ class NamesReq class NamesReq extends ProfileValidate { @@ -137,7 +137,7 @@ class NamesReq extends ProfileValidate $this->profileOwner->id(), true, $this->new_alias); // Update the local User object, to pick up the new bestalias. - $this->profileOwner = User::getSilent($this->profileOwner->id()); + $this->profileOwner = User::getSilentWithUID($this->profileOwner->id()); } return true;