Set $reset_by_sms even if password reset is disabled

... to avoid an "undefined variable" warning
pull/169/head
Christian Boltz 7 years ago
parent 7c38bdd871
commit 24ad5cc3d8
No known key found for this signature in database
GPG Key ID: C6A682EA63C82F1C

@ -36,12 +36,10 @@ class AdminHandler extends PFAHandler {
$passwordReset = Config::read('forgotten_admin_password_reset');
if ($passwordReset) {
$reset_by_sms = 0;
if (Config::read('sms_send_function')) {
if ($passwordReset && Config::read('sms_send_function')) {
$reset_by_sms = 1;
}
}
$this->struct=array(
# field name allow display in... type $PALANG label $PALANG description default / options / ...

@ -13,12 +13,10 @@ 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')) {
if ($passwordReset && Config::read('sms_send_function')) {
$reset_by_sms = 1;
}
}
$this->struct=array(
# field name allow display in... type $PALANG label $PALANG description default / options / ...

Loading…
Cancel
Save