Fix profile "refreshing" in NamesReq.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Fri, 27 Aug 2010 16:36:44 +0000 (18:36 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Fri, 27 Aug 2010 16:36:44 +0000 (18:36 +0200)
Also fixes User->getLogin($login) with login being a uid.

Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
classes/user.php
include/validations/names.inc.php

index f7f90fa..f888865 100644 (file)
@@ -37,7 +37,7 @@ class User extends PlUser
         }
 
         if ($login instanceof User) {
-            $machin->id();
+            return $login->id();
         }
 
         if ($login instanceof Profile) {
index 08fd85b..4c33f84 100644 (file)
@@ -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;