b2evolution PHP Cross Reference Blogging Systems

Source: /skins_email/account_activate.txt.php - 109 lines - 4676 bytes - Text - Print

Description: This is sent to a ((User)) when he needs to activate his account. Typically includes an activation link. For more info about email skins, see: http://b2evolution.net/man/themes-templates-skins/email-skins/

   1  <?php
   2  /**
   3   * This is sent to a ((User)) when he needs to activate his account. Typically includes an activation link.
   4   *
   5   * For more info about email skins, see: http://b2evolution.net/man/themes-templates-skins/email-skins/
   6   *
   7   * b2evolution - {@link http://b2evolution.net/}
   8   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
   9   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
  10   *
  11   * @version $Id: account_activate.txt.php 6136 2014-03-08 07:59:48Z manuel $
  12   */
  13  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  14  
  15  // ---------------------------- EMAIL HEADER INCLUDED HERE ----------------------------
  16  emailskin_include( '_email_header.inc.txt.php', $params );
  17  // ------------------------------- END OF EMAIL HEADER --------------------------------
  18  
  19  /**
  20   * @var Session
  21   */
  22  global $Session;
  23  /**
  24   * @var GeneralSettings
  25   */
  26  global $Settings;
  27  
  28  global $secure_htsrv_url, $htsrv_url, $baseurl;
  29  
  30  // Default params:
  31  $params = array_merge( array(
  32          'locale'                    => '',
  33          'status'                    => '',
  34          'blog_param'                => '',
  35          'request_id'                => '',
  36          'reminder_key'              => '',
  37          'already_received_messages' => '',
  38      ), $params );
  39  
  40  switch( $params['status'] )
  41  {
  42      case 'new':
  43          echo sprintf( T_( 'You have recently registered a new account on %s .' ), $baseurl );
  44          echo "\n\n".T_( 'You must activate this account by clicking below in order to be able to use all the site features.' );
  45          $activation_text = T_( 'Please activate this account by clicking on the following link:' );
  46          break;
  47      case 'emailchanged':
  48          echo sprintf( T_( 'You have recently changed the email address associated with your account on %s .' ), $baseurl );
  49          echo "\n\n".T_( 'You must reactivate this account by clicking below in order to continue to use all the site features.' );
  50          $activation_text = T_( 'Please reactivate this account by clicking on the following link:' );
  51          break;
  52      case 'deactivated':
  53          echo sprintf( T_( 'Your account on %s needs to be reactivated.' ), $baseurl );
  54          echo "\n\n".T_( 'You must reactivate this account by clicking below in order to continue to use all the site features.' );
  55          $activation_text = T_( 'Please reactivate this account by clicking on the following link:' );
  56          break;
  57      default:
  58          echo sprintf( T_( 'Someone -- presumably you -- has registered an account on %s with your email address.' ), $baseurl );
  59          echo "\n\n".T_( 'You must activate this account by clicking below in order to be able to use all the site features.' );
  60          $activation_text = T_( 'Please activate this account by clicking on the following link:' );
  61          break;
  62  }
  63  
  64  echo "\n\n";
  65  echo T_('Your login is: $login$')."\n";
  66  echo T_('Your email is: $email$');
  67  echo "\n\n";
  68  
  69  if( $Settings->get( 'validation_process' ) == 'easy' )
  70  { // ---- EASY activation ---- //
  71      $activation_url = $htsrv_url.'login.php?action=activateaccount'
  72          .'&userID=$user_ID$'
  73          .'&reminderKey='.$params['reminder_key'];
  74  
  75      echo $activation_text."\n".$activation_url;
  76  
  77      if( !empty( $params['already_received_messages'] ) )
  78      { // add already received message list to email body
  79          echo "\n\n".T_( 'You have received private messages in the following conversations, but your account must be activated before you can read them:' )."\n";
  80          echo $params['already_received_messages'];
  81      }
  82  }
  83  else
  84  { // ---- SECURE activation ---- //
  85      $activation_url = $secure_htsrv_url.'login.php?action=validatemail'
  86          .$params['blog_param']
  87          .'&reqID='.$params['request_id']
  88          .'&sessID='.$Session->ID; // used to detect cookie problems
  89  
  90      echo $activation_text."\n".$activation_url;
  91      echo "\n\n";
  92  
  93      echo T_('If this does not work, please copy/paste that link into the address bar of your browser.');
  94      echo "\n\n";
  95  
  96      echo sprintf( T_('We also recommend that you add %s to your contacts in order to make sure you will receive future notifications, especially when someone sends you a private message.'), $Settings->get( 'notification_sender_email' ) );
  97      echo "\n\n-- \n";
  98  
  99      echo T_('Please note:').' '.T_('For security reasons the link is only valid for your current session (by means of your session cookie).');
 100  }
 101  
 102  // Footer vars:
 103  $params['unsubscribe_text'] = T_( 'If you don\'t want to receive notifications to activate your account any more, click here:' ).' '.
 104          $htsrv_url.'quick_unsubscribe.php?type=account_activation&user_ID=$user_ID$&key=$unsubscribe_key$';
 105  
 106  // ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
 107  emailskin_include( '_email_footer.inc.txt.php', $params );
 108  // ------------------------------- END OF EMAIL FOOTER --------------------------------
 109  ?>

title

Description

title

Description

title

Description

title

title

Body