From a412558492bf24ee9c39502ac37730ff4bc40177 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 14 Jan 2012 15:02:02 +0000 Subject: feature:2021 change contents of the mail + add option on admin/user_list git-svn-id: http://piwigo.org/svn/trunk@12886 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/user_list.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'admin/user_list.php') diff --git a/admin/user_list.php b/admin/user_list.php index 33c3485f1..425c3c698 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -242,6 +242,38 @@ else if ($conf['double_password_type_in_admin'] == false) } } +// email notification +if ( + isset($_POST['submit_add']) + and count($page['errors']) == 0 + and !empty($_POST['email']) + and isset($_POST['send_password_by_mail']) + ) +{ + include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); + + $keyargs_content = array( + get_l10n_args('Hello %s,', $_POST['login']), + get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']), + get_l10n_args('', ''), + get_l10n_args('Here are your connection settings', ''), + get_l10n_args('Username: %s', $_POST['login']), + get_l10n_args('Password: %s', $_POST['password']), + get_l10n_args('Email: %s', $_POST['email']), + get_l10n_args('', ''), + get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()), + ); + + pwg_mail( + $_POST['email'], + array( + 'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'), + 'content' => l10n_args($keyargs_content), + 'content_format' => 'text/plain', + ) + ); +} + // +-----------------------------------------------------------------------+ // | user list | // +-----------------------------------------------------------------------+ -- cgit v1.2.3