* Admin: Save the bulk password reset notification email for next time

This commit is contained in:
nathangray 2017-02-02 08:45:36 -07:00
parent efe0d62df7
commit 33680d4467

View File

@ -72,6 +72,9 @@ class admin_passwordreset
} }
if (is_array($content)) if (is_array($content))
{ {
// Save message for next time
Api\Config::save_value('password_reset_message',array('subject' => $content['subject'], 'body' => $content['body']),'admin');
if ($content['download_csv'] && $content['changed']) if ($content['download_csv'] && $content['changed'])
{ {
Api\Header\Content::type('changed.csv', 'text/csv'); Api\Header\Content::type('changed.csv', 'text/csv');
@ -258,6 +261,12 @@ class admin_passwordreset
passwdhashes($GLOBALS['egw_info']['server'],true); passwdhashes($GLOBALS['egw_info']['server'],true);
$sel_options['activate'] = array('Deactivate','Activate'); $sel_options['activate'] = array('Deactivate','Activate');
// Start with same message as last time
$config = Api\Config::read('admin');
$message = $config['password_reset_message'];
$content['subject'] = $message['subject'];
$content['body'] = $message['body'];
$content['replacements'] = array(); $content['replacements'] = array();
foreach($this->replacements as $name => $label) foreach($this->replacements as $name => $label)
{ {