Merge commit 'origin/fusionax' into account
[platal.git] / include / validations / names.inc.php
index 2c3ff1a..3969f85 100644 (file)
@@ -128,6 +128,10 @@ class NamesReq extends Validate
         register_watch_op($this->user->id(), WATCH_FICHE, '', 'search_names');
         set_profile_display($this->display_names);
         set_alias_names($this->sn_new, $this->sn_old, true, $this->new_alias);
+
+        // Update the local User object, to pick up the new bestalias.
+        $this->user = User::getSilent($this->user->id());
+
         return true;
     }