From 651688c802de2cc6d64b1ef15f1b074a4bf2f2b3 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Tue, 11 Jun 2019 21:05:53 +0100 Subject: [PATCH] if we are generating passwords, there will only be one password value; so reduce the fields we check before deciding whether to update password_expiry - see https://github.com/postfixadmin/postfixadmin/issues/266 --- model/MailboxHandler.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index 9f2d4192..fc16c62f 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -257,9 +257,8 @@ class MailboxHandler extends PFAHandler { return false; } - - if (!empty($this->values['password']) && !empty($this->values['password2']) && $this->values['password'] == $this->values['password2']) { - // some default value, meaningless unless the server is configured to check it. + if (!empty($this->values['password'])) { + // provide some default value to keep MySQL etc happy. $this->values['password_expiry'] = date('Y-m-d H:i', strtotime("+365 days")); if (Config::bool('password_expiration')) { $domain_dirty = $this->domain_from_id();