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
This commit is contained in:
parent
25481da931
commit
af2302c1db
8 changed files with 70 additions and 1 deletions
21
install.php
21
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)
|
||||
|
|
|
@ -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';
|
||||
|
||||
?>
|
|
@ -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';
|
||||
|
||||
?>
|
|
@ -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 !';
|
||||
|
||||
?>
|
|
@ -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';
|
||||
|
||||
?>
|
|
@ -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';
|
||||
|
||||
?>
|
|
@ -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';
|
||||
|
||||
?>
|
||||
|
|
23
register.php
23
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue