diff --git a/model/AdminHandler.php b/model/AdminHandler.php index db559a17..1d2f3cf3 100644 --- a/model/AdminHandler.php +++ b/model/AdminHandler.php @@ -36,11 +36,9 @@ class AdminHandler extends PFAHandler { $passwordReset = Config::read('forgotten_admin_password_reset'); - if ($passwordReset) { - $reset_by_sms = 0; - if (Config::read('sms_send_function')) { - $reset_by_sms = 1; - } + $reset_by_sms = 0; + if ($passwordReset && Config::read('sms_send_function')) { + $reset_by_sms = 1; } $this->struct=array( diff --git a/model/MailboxHandler.php b/model/MailboxHandler.php index b073b38f..e28548f1 100644 --- a/model/MailboxHandler.php +++ b/model/MailboxHandler.php @@ -13,11 +13,9 @@ class MailboxHandler extends PFAHandler { # init $this->struct, $this->db_table and $this->id_field protected function initStruct() { $passwordReset = Config::read('forgotten_user_password_reset'); - if ($passwordReset) { - $reset_by_sms = 0; - if (Config::read('sms_send_function')) { - $reset_by_sms = 1; - } + $reset_by_sms = 0; + if ($passwordReset && Config::read('sms_send_function')) { + $reset_by_sms = 1; } $this->struct=array(