Merge commit 'origin/fusionax' into account
[platal.git] / include / validations / names.inc.php
index b5b62ff..3969f85 100644 (file)
@@ -123,11 +123,15 @@ class NamesReq extends Validate
     public function commit()
     {
         require_once 'notifs.inc.php';
-        require_once('name.func.inc.php');
+        require_once 'name.func.inc.php';
 
         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;
     }