From e5e219f35ca44813b30939a0ef91b5b7d26ae232 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 27 Jul 2014 13:24:19 +0000 Subject: [PATCH] preset alternate email with backup email address (RFE 111) --- lam/HISTORY | 3 +++ lam/lib/modules.inc | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lam/HISTORY b/lam/HISTORY index c53b107c..3c4efb22 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,5 +1,8 @@ September 2014 4.7 + - Personal: support pager attribute (hidden by default) - renamed config/lam.conf_sample to lam.conf.sample and config.cfg_sample to config.cfg.sample + - LAM Pro: + -> Password dialog: preset alternate email address with backup email address (RFE 111) 12.06.2014 4.6 diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 50d298e9..0070dc5f 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1068,7 +1068,15 @@ class accountContainer { $container->addElement($pwdMailCheckbox); $container->addElement(new htmlHelpLink('407'), true); if (($_SESSION['config']->getLamProMailAllowAlternateAddress() != 'false')) { - $container->addElement(new htmlTableExtendedInputField(_('Alternate recipient'), 'lamPasswordChangeSendMailAddress', '', '410')); + $alternateMail = ''; + $pwdResetModule = $this->getAccountModule('passwordSelfReset'); + if (!empty($pwdResetModule)) { + $backupMail = $pwdResetModule->getBackupEmail(); + if (!empty($backupMail)) { + $alternateMail = $pwdResetModule->getBackupEmail(); + } + } + $container->addElement(new htmlTableExtendedInputField(_('Alternate recipient'), 'lamPasswordChangeSendMailAddress', $alternateMail, '410')); } } $container->addElement(new htmlSpacer(null, '10px'), true);