Changeset 12883 for trunk/register.php


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.