aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--install.php21
-rw-r--r--language/en_UK/common.lang.php6
-rw-r--r--language/en_UK/install.lang.php5
-rw-r--r--language/fr_CA/common.lang.php5
-rw-r--r--language/fr_CA/install.lang.php2
-rw-r--r--language/fr_FR/common.lang.php6
-rw-r--r--language/fr_FR/install.lang.php3
-rw-r--r--register.php23
8 files changed, 70 insertions, 1 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)
diff --git a/language/en_UK/common.lang.php b/language/en_UK/common.lang.php
index 58227bedd..b16ba9898 100644
--- a/language/en_UK/common.lang.php
+++ b/language/en_UK/common.lang.php
@@ -180,6 +180,7 @@ $lang['group by letters'] = "group by letters";
$lang['guest'] = "guest";
$lang['Hello %s, your Piwigo photo gallery is empty!'] = 'Hello %s, your Piwigo photo gallery is empty!';
$lang['Hello'] = "Hello";
+$lang['Hello %s,'] = 'Hello %s,';
$lang['Help'] = "Help";
$lang['Home'] = "Home";
$lang['html tags are not allowed in login'] = 'html tags are not allowed in login';
@@ -316,6 +317,7 @@ $lang['slideshow'] = "slideshow";
$lang['Someone requested that the password be reset for the following user account:'] = 'Someone requested that the password be reset for the following user account:';
$lang['Sort by'] = "Sort by";
$lang['Sort order'] = "Sort order";
+$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Successfully registered, an email with your password has been sent to you. Welcome!';
$lang['Specials'] = "Specials";
$lang['SQL queries in'] = "SQL queries in";
$lang['stop the slideshow'] = "stop the slideshow";
@@ -372,4 +374,8 @@ $lang['large'] = "Large";
$lang['xlarge'] = "XLarge";
$lang['xxlarge'] = "XXLarge";
$lang['original'] = "Original";
+$lang['Thank you for registering at %s!'] = 'Thank you for registering at %s!';
+$lang['Here is your password: %s'] = 'Here is your password: %s';
+$lang['If you think you\'ve received this email in error, please contact us at %s'] = 'If you think you\'ve received this email in error, please contact us at %s';
+
?> \ No newline at end of file
diff --git a/language/en_UK/install.lang.php b/language/en_UK/install.lang.php
index 0b9dd5317..91a13a741 100644
--- a/language/en_UK/install.lang.php
+++ b/language/en_UK/install.lang.php
@@ -70,4 +70,7 @@ $lang['Download the config file'] = 'Download the config file';
$lang['You can download the config file and upload it to local/config directory of your installation.'] = 'You can download the config file and upload it to local/config directory of your installation.';
$lang['Just another Piwigo gallery'] = 'Just another Piwigo gallery';
$lang['Welcome to my photo gallery'] = 'Welcome to my photo gallery';
-?>
+$lang['Welcome to your new installation of Piwigo!'] = 'Welcome to your new installation of Piwigo!';
+$lang['Don\'t hesitate to consult our forums for any help : %s'] = 'Don\'t hesitate to consult our forums for any help: %s';
+
+?> \ No newline at end of file
diff --git a/language/fr_CA/common.lang.php b/language/fr_CA/common.lang.php
index 3cb2f2fd3..4535e734a 100644
--- a/language/fr_CA/common.lang.php
+++ b/language/fr_CA/common.lang.php
@@ -367,5 +367,10 @@ $lang['EXIF Metadata'] = 'Données EXIF';
$lang['IPTC Metadata'] = 'Données IPTC';
$lang['Your username has been successfully changed to : %s'] = 'Votre nom d\'utilisateur a bien été changé par : %s';
$lang['Username modification'] = 'Modification du nom d\'utilisateur';
+$lang['Hello %s,'] = 'Bonjour %s,';
+$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !';
+$lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
+$lang['If you think you\'ve received this email in error, please contact us at %s'] = 'Si vous pensez avoir reçu cet email par erreur, veuillez nous contacter %s';
+$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription terminée, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
?> \ No newline at end of file
diff --git a/language/fr_CA/install.lang.php b/language/fr_CA/install.lang.php
index 63835a05f..d95a53e26 100644
--- a/language/fr_CA/install.lang.php
+++ b/language/fr_CA/install.lang.php
@@ -70,5 +70,7 @@ $lang['Download the config file'] = 'Télécharger le fichier de configuration';
$lang['You can download the config file and upload it to local/config directory of your installation.'] = 'Vous pouvez télécharger le fichier de configuration et le transférer dans le répertoire local/config de votre installation Piwigo.';
$lang['Just another Piwigo gallery'] = 'Une galerie Piwigo de plus';
$lang['Welcome to my photo gallery'] = 'Bienvenue sur ma galerie photo';
+$lang['Welcome to your new installation of Piwigo!'] = 'Bienvenue sur votre nouvelle installtion de Piwigo!';
+$lang['Don\'t hesitate to consult our forums for any help : %s'] = 'N\'hésitez pas à consulter bos forums si vous avez le moindre problème : %s';
?> \ No newline at end of file
diff --git a/language/fr_FR/common.lang.php b/language/fr_FR/common.lang.php
index f4081fcdc..049f81eb4 100644
--- a/language/fr_FR/common.lang.php
+++ b/language/fr_FR/common.lang.php
@@ -180,6 +180,7 @@ $lang['group by letters'] = 'regrouper par lettres';
$lang['guest'] = 'visiteur';
$lang['Hello %s, your Piwigo photo gallery is empty!'] = 'Bonjour %s, votre galerie photo Piwigo est vide !';
$lang['Hello'] = 'Bonjour';
+$lang['Hello %s,'] = 'Bonjour %s,';
$lang['Help'] = 'Aide';
$lang['Home'] = 'Accueil';
$lang['html tags are not allowed in login'] = 'les balises html ne sont pas autorisées dans le login';
@@ -316,6 +317,7 @@ $lang['slideshow'] = 'diaporama';
$lang['Someone requested that the password be reset for the following user account:'] = 'Quelqu\'un a demandé le renouvellement de votre mot de passe pour l\'utilisateur suivant :';
$lang['Sort by'] = 'Trier selon';
$lang['Sort order'] = 'Ordre de tri';
+$lang['Successfully registered, an email with your password has been sent to you. Welcome!'] = 'Inscription terminée, un email avec votre mot de passe vient de vous être envoyé. Bienvenue !';
$lang['Specials'] = 'Spéciales';
$lang['SQL queries in'] = 'requêtes SQL en';
$lang['stop the slideshow'] = 'arrêter le diaporama';
@@ -364,5 +366,9 @@ $lang['Your favorites'] = 'Mes favorites';
$lang['Your Gallery Customization'] = 'Personnalisation de votre affichage ';
$lang['Your username has been successfully changed to : %s'] = 'Votre nom d\'utilisateur a bien été changé par : %s';
$lang['Your password has been reset'] = 'Votre mot de passe a été réinitialisé';
+$lang['original'] = "Original";
+$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !';
+$lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
+$lang['If you think you\'ve received this email in error, please contact us at %s'] = 'Si vous pensez avoir reçu cet email par erreur, veuillez nous contacter %s';
?> \ No newline at end of file
diff --git a/language/fr_FR/install.lang.php b/language/fr_FR/install.lang.php
index 8772ce31a..bfc385ec5 100644
--- a/language/fr_FR/install.lang.php
+++ b/language/fr_FR/install.lang.php
@@ -71,4 +71,7 @@ $lang['Download the config file'] = 'Télécharger le fichier de configuration';
$lang['You can download the config file and upload it to local/config directory of your installation.'] = 'Vous pouvez télécharger le fichier de configuration et le transférer dans le répertoire local/config de votre installation Piwigo.';
$lang['Just another Piwigo gallery'] = 'Une galerie Piwigo de plus';
$lang['Welcome to my photo gallery'] = 'Bienvenue sur ma galerie photo';
+$lang['Welcome to your new installation of Piwigo!'] = 'Bienvenue sur votre nouvelle installtion de Piwigo!';
+$lang['Don\'t hesitate to consult our forums for any help : %s'] = 'N\'hésitez pas à consulter bos forums si vous avez le moindre problème : %s';
+
?>
diff --git a/register.php b/register.php
index b5cdfb61c..93f962391 100644
--- a/register.php
+++ b/register.php
@@ -59,8 +59,31 @@ if (isset($_POST['submit']))
if (count($page['errors']) == 0)
{
+ // email notification
+ 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 is your password: %s', $_POST['password']),
+ 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['mail_address'],
+ array(
+ 'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
+ 'content' => l10n_args($keyargs_content),
+ 'content_format' => 'text/plain',
+ )
+ );
+
+ // log user and redirect
$user_id = get_userid($_POST['login']);
log_user($user_id, false);
+ $_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
redirect(make_index_url());
}
$registration_post_key = get_ephemeral_key(2);