aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user_list.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-01-14 15:02:02 +0000
committermistic100 <mistic@piwigo.org>2012-01-14 15:02:02 +0000
commita412558492bf24ee9c39502ac37730ff4bc40177 (patch)
tree046c7239358a40292d9c02a146eb897972af2c54 /admin/user_list.php
parent5ea5350deb37777e815248488fd49699c18ab9e2 (diff)
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
Diffstat (limited to '')
-rw-r--r--admin/user_list.php32
1 files changed, 32 insertions, 0 deletions
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 |
// +-----------------------------------------------------------------------+