Changeset 12883


Ignore:
Timestamp:
Jan 14, 2012, 1:00:47 PM (9 years ago)
Author:
mistic100
Message:

2021: email notification on user creation + mail for admin at installation

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/install.php

    r12802 r12883  
    460460    $user = build_user(1, true);
    461461    log_user($user['id'], false);
     462   
     463    // email notification
     464    include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     465         
     466    $keyargs_content = array(
     467      get_l10n_args('Hello %s,', $admin_name),
     468      get_l10n_args('Welcome to your new installation of Piwigo!', ''),
     469      get_l10n_args('', ''),
     470      get_l10n_args('Here is your password: %s', $admin_pass1),
     471      get_l10n_args('', ''),
     472      get_l10n_args('Don\'t hesitate to consult our forums for any help: %s', PHPWG_URL),
     473      );
     474     
     475    pwg_mail(
     476      $admin_mail,
     477      array(
     478        'subject' => 'Just another Piwigo gallery',
     479        'content' => l10n_args($keyargs_content),
     480        'content_format' => 'text/plain',
     481        )
     482      );
    462483  }
    463484}
  • trunk/language/en_UK/common.lang.php

    r12882 r12883  
    181181$lang['Hello %s, your Piwigo photo gallery is empty!'] = 'Hello %s, your Piwigo photo gallery is empty!';
    182182$lang['Hello'] = "Hello";
     183$lang['Hello %s,'] = 'Hello %s,';
    183184$lang['Help'] = "Help";
    184185$lang['Home'] = "Home";
     
    317318$lang['Sort by'] = "Sort by";
    318319$lang['Sort order'] = "Sort order";
     320$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!';
    319321$lang['Specials'] = "Specials";
    320322$lang['SQL queries in'] = "SQL queries in";
     
    373375$lang['xxlarge'] = "XXLarge";
    374376$lang['original'] = "Original";
     377$lang['Thank you for registering at %s!'] = 'Thank you for registering at %s!';
     378$lang['Here is your password: %s'] = 'Here is your password: %s';
     379$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';
     380
    375381?>
  • trunk/language/en_UK/install.lang.php

    r12105 r12883  
    7171$lang['Just another Piwigo gallery'] = 'Just another Piwigo gallery';
    7272$lang['Welcome to my photo gallery'] = 'Welcome to my photo gallery';
     73$lang['Welcome to your new installation of Piwigo!'] = 'Welcome to your new installation of Piwigo!';
     74$lang['Don\'t hesitate to consult our forums for any help : %s'] = 'Don\'t hesitate to consult our forums for any help: %s';
     75
    7376?>
  • trunk/language/fr_CA/common.lang.php

    r12882 r12883  
    368368$lang['Your username has been successfully changed to : %s'] = 'Votre nom d\'utilisateur a bien été changé par : %s';
    369369$lang['Username modification'] = 'Modification du nom d\'utilisateur';
     370$lang['Hello %s,'] = 'Bonjour %s,';
     371$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !';
     372$lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
     373$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';
     374$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 !';
    370375
    371376?>
  • trunk/language/fr_CA/install.lang.php

    r12242 r12883  
    7171$lang['Just another Piwigo gallery'] = 'Une galerie Piwigo de plus';
    7272$lang['Welcome to my photo gallery'] = 'Bienvenue sur ma galerie photo';
     73$lang['Welcome to your new installation of Piwigo!'] = 'Bienvenue sur votre nouvelle installtion de Piwigo!';
     74$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';
    7375
    7476?>
  • trunk/language/fr_FR/common.lang.php

    r12882 r12883  
    181181$lang['Hello %s, your Piwigo photo gallery is empty!'] = 'Bonjour %s, votre galerie photo Piwigo est vide !';
    182182$lang['Hello'] = 'Bonjour';
     183$lang['Hello %s,'] = 'Bonjour %s,';
    183184$lang['Help'] = 'Aide';
    184185$lang['Home'] = 'Accueil';
     
    317318$lang['Sort by'] = 'Trier selon';
    318319$lang['Sort order'] = 'Ordre de tri';
     320$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 !';
    319321$lang['Specials'] = 'Spéciales';
    320322$lang['SQL queries in'] = 'requêtes SQL en';
     
    365367$lang['Your username has been successfully changed to : %s'] = 'Votre nom d\'utilisateur a bien été changé par : %s';
    366368$lang['Your password has been reset'] = 'Votre mot de passe a été réinitialisé';
     369$lang['original'] = "Original";
     370$lang['Thank you for registering at %s!'] = 'Merci pour votre inscription sur %s !';
     371$lang['Here is your password: %s'] = 'Votre mot de passe est : %s';
     372$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';
    367373
    368374?>
  • trunk/language/fr_FR/install.lang.php

    r12105 r12883  
    7272$lang['Just another Piwigo gallery'] = 'Une galerie Piwigo de plus';
    7373$lang['Welcome to my photo gallery'] = 'Bienvenue sur ma galerie photo';
     74$lang['Welcome to your new installation of Piwigo!'] = 'Bienvenue sur votre nouvelle installtion de Piwigo!';
     75$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';
     76
    7477?>
  • trunk/register.php

    r12764 r12883  
    6060  if (count($page['errors']) == 0)
    6161  {
     62    // email notification
     63    include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
     64         
     65    $keyargs_content = array(
     66      get_l10n_args('Hello %s,', $_POST['login']),
     67      get_l10n_args('Thank you for registering at %s!', $conf['gallery_title']),
     68      get_l10n_args('', ''),
     69      get_l10n_args('Here is your password: %s', $_POST['password']),
     70      get_l10n_args('', ''),
     71      get_l10n_args('If you think you\'ve received this email in error, please contact us at %s', get_webmaster_mail_address()),
     72      );
     73     
     74    pwg_mail(
     75      $_POST['mail_address'],
     76      array(
     77        'subject' => '['.$conf['gallery_title'].'] '.l10n('Registration'),
     78        'content' => l10n_args($keyargs_content),
     79        'content_format' => 'text/plain',
     80        )
     81      );
     82   
     83    // log user and redirect
    6284    $user_id = get_userid($_POST['login']);
    6385    log_user($user_id, false);
     86    $_SESSION['page_infos'][] = l10n('Successfully registered, an email with your password has been sent to you. Welcome!');
    6487    redirect(make_index_url());
    6588  }
Note: See TracChangeset for help on using the changeset viewer.