b2evolution PHP Cross Reference Blogging Systems

Source: /skins_email/account_activate.html.php - 108 lines - 4993 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.html.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.html.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  $baseurl_link = '<a href="'.$baseurl.'">'.$Settings->get( 'notification_short_name' ).'</a>';
  41  
  42  switch( $params['status'] )
  43  {
  44      case 'new':
  45          echo '<p>'.sprintf( T_( 'You have recently registered a new account on %s .' ), $baseurl_link ).'</p>';
  46          echo '<p><b class="important">'.T_( 'You must activate this account by clicking below in order to be able to use all the site features.' ).'</b></p>';
  47          $activation_text = T_( 'Activate NOW' );
  48          break;
  49      case 'emailchanged':
  50          echo '<p>'.sprintf( T_( 'You have recently changed the email address associated with your account on %s .' ), $baseurl_link ).'</p>';
  51          echo '<p><b class="important">'.T_( 'You must reactivate this account by clicking below in order to continue to use all the site features.' ).'</b></p>';
  52          $activation_text = T_( 'Reactivate NOW' );
  53          break;
  54      case 'deactivated':
  55          echo '<p>'.sprintf( T_( 'Your account on %s needs to be reactivated.' ), $baseurl_link ).'</p>';
  56          echo '<p><b class="important">'.T_( 'You must reactivate this account by clicking below in order to continue to use all the site features.' ).'</b></p>';
  57          $activation_text = T_( 'Reactivate NOW' );
  58          break;
  59      default:
  60          echo '<p>'.sprintf( T_( 'Someone -- presumably you -- has registered an account on %s with your email address.' ), $baseurl_link ).'</p>';
  61          echo '<p><b class="important">'.T_( 'You must activate this account by clicking below in order to be able to use all the site features.' ).'</b></p>';
  62          $activation_text = T_( 'Activate NOW' );
  63          break;
  64  }
  65  echo "\n";
  66  
  67  echo '<p>'.T_('Your login is: $login$')."</p>\n";
  68  echo '<p>'.T_('Your email is: $email$')."</p>\n";
  69  
  70  if( $Settings->get( 'validation_process' ) == 'easy' )
  71  { // ---- EASY activation ---- //
  72      $activation_url = $htsrv_url.'login.php?action=activateaccount'
  73          .'&userID=$user_ID$'
  74          .'&reminderKey='.$params['reminder_key'];
  75  
  76      echo '<div class="buttons">'."\n".get_link_tag( $activation_url, $activation_text, 'button_green' )."</div>\n";
  77  
  78      if( !empty( $params['already_received_messages'] ) )
  79      { // add already received message list to email body
  80          echo '<p>'.T_( 'You have received private messages in the following conversations, but your account must be activated before you can read them:' )."</p>\n";
  81          echo '<p>'.$params['already_received_messages']."</p>\n";
  82      }
  83  }
  84  else
  85  { // ---- SECURE activation ---- //
  86      $activation_url = $secure_htsrv_url.'login.php?action=validatemail'
  87          .$params['blog_param']
  88          .'&reqID='.$params['request_id']
  89          .'&sessID='.$Session->ID; // used to detect cookie problems
  90  
  91      echo '<div class="buttons">'."\n".get_link_tag( $activation_url, $activation_text, 'button_green' )."\n</div>\n";
  92  
  93      echo '<p>'.T_('If this does not work, please copy/paste that link into the address bar of your browser.')."</p>\n";
  94  
  95      echo '<p>'.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' ) )."</p>\n";
  96  
  97      echo '<p class="note">'.T_('Please note:').' '.T_('For security reasons the link is only valid for your current session (by means of your session cookie).')."</p>\n";
  98  }
  99  
 100  // Footer vars:
 101  $params['unsubscribe_text'] = T_( 'If you don\'t want to receive notifications to activate your account any more, click here:' )
 102              .' <a href="'.$htsrv_url.'quick_unsubscribe.php?type=account_activation&user_ID=$user_ID$&key=$unsubscribe_key$">'
 103              .T_('instant unsubscribe').'</a>.';
 104  
 105  // ---------------------------- EMAIL FOOTER INCLUDED HERE ----------------------------
 106  emailskin_include( '_email_footer.inc.html.php', $params );
 107  // ------------------------------- END OF EMAIL FOOTER --------------------------------
 108  ?>

title

Description

title

Description

title

Description

title

title

Body