From 468a27eb3d72b30bb84a244eb4d02ab9fb36610b Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 9 Apr 2012 18:00:12 +0200 Subject: [PATCH] Fixes reactivation of broken and suspended emails (Closes #1597). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- ChangeLog | 1 + include/emails.inc.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c31fb50..76c6dbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Bug/Wish: - #1608: Displays proper url in auth-group-x login -JAC * Email: + - #1597: Fixes reactivation of broken and suspended emails -JAC - #1601: Displays errors and warnings when adding people to ML -JAC * Search: diff --git a/include/emails.inc.php b/include/emails.inc.php index 4da4657..505f290 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -541,7 +541,7 @@ class Email // Activates the email address as a redirection. public function activate() { - if ($this->inactive) { + if (!$this->active) { if (in_array($this->type, self::get_allowed_storages($this->user))) { self::activate_storage($this->user, $this->type, $this->action); } else { @@ -551,6 +551,8 @@ class Email $this->user->id(), $this->email); } S::logger()->log('email_on', $this->email . ($this->user->id() != S::v('uid') ? "(admin on {$this->user->login()})" : '')); + $this->disabled = false; + $this->broken = false; $this->inactive = false; $this->active = true; } -- 2.1.4