Fixes notification email on removal of "nom d'usage" -- the email was sent to the...
authorVincent Zanotti <vincent.zanotti@m4x.org>
Thu, 19 Mar 2009 00:04:12 +0000 (01:04 +0100)
committerVincent Zanotti <vincent.zanotti@m4x.org>
Thu, 19 Mar 2009 00:05:24 +0000 (01:05 +0100)
Signed-off-by: Vincent Zanotti <vincent.zanotti@m4x.org>
include/validations/nomusage.inc.php

index 0bc76cd..df5bee3 100644 (file)
@@ -117,6 +117,10 @@ class UsageReq extends Validate
         register_watch_op($this->user->id(), WATCH_FICHE, '', 'nom');
         require_once('user.func.inc.php');
         set_new_usage($this->user->id(), $this->nom_usage, $this->alias);
+
+        // Update the local User object, to pick up the new bestalias.
+        $this->user = User::getSilent($this->user->id());
+
         return true;
     }