Fixes bestalias after updating melix alias (Closing #1533).
authorStéphane Jacob <sj@m4x.org>
Thu, 25 Aug 2011 21:13:41 +0000 (23:13 +0200)
committerStéphane Jacob <sj@m4x.org>
Thu, 25 Aug 2011 21:13:41 +0000 (23:13 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
include/validations/aliases.inc.php

index 444b4c5..4236ace 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@ Bug/Wish:
 
     * Email:
         - #1517: Fixes bestalias update when two local_part are identical  -JAC
+        - #1533: Fixes bestalias after updating melix alias                -JAC
 
 From 1.1.2 branch:
 
index 4dabe8d..5109fa9 100644 (file)
@@ -99,6 +99,12 @@ class AliasReq extends Validate
                                      $this->alias, $this->user->id(), Platal::globals()->mail->alias_dom);
         }
 
+        if ($success) {
+            // Update the local User object, to pick up the new bestalias.
+            fix_bestalias($this->user);
+            $this->user = User::getSilentWithUID($this->user->id());
+        }
+
         return $success;
     }
 }