aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-01-14 12:00:47 +0000
committermistic100 <mistic@piwigo.org>2012-01-14 12:00:47 +0000
commitaf2302c1dbefa94968bd1dc067b9488790fd6f9c (patch)
tree49606f9b5751ed2007a9c26a99ec36a3f735b5c6 /install
parent25481da931ae564320d2d2cc0f4735c8b058a161 (diff)
2021: email notification on user creation + mail for admin at installation
git-svn-id: http://piwigo.org/svn/trunk@12883 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--install.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/install.php b/install.php
index 17c1c578f..2084d8f08 100644
--- a/install.php
+++ b/install.php
@@ -459,6 +459,27 @@ else
session_set_cookie_params(0, cookie_path());
$user = build_user(1, true);
log_user($user['id'], false);
+
+ // email notification
+ include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
+
+ $keyargs_content = array(
+ get_l10n_args('Hello %s,', $admin_name),
+ get_l10n_args('Welcome to your new installation of Piwigo!', ''),
+ get_l10n_args('', ''),
+ get_l10n_args('Here is your password: %s', $admin_pass1),
+ get_l10n_args('', ''),
+ get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
+ );
+
+ pwg_mail(
+ $admin_mail,
+ array(
+ 'subject' => 'Just another Piwigo gallery',
+ 'content' => l10n_args($keyargs_content),
+ 'content_format' => 'text/plain',
+ )
+ );
}
}
if (count($errors) != 0)