Changeset 9400


Ignore:
Timestamp:
02/27/11 18:57:20 (9 years ago)
Author:
Eric
Message:

bug 2206 fixed : The email sent to renamed users shows standard information (new username and related email address) in addition of customizable text. The email subject shows the old username.

Location:
extensions/LCAS/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/LCAS/trunk/admin/LCAS_admin.php

    r9398 r9400  
    102102          if ($count < 1) 
    103103          { 
     104            // Get old username befor update - Usefull for user notification if is set 
     105            $query =' 
     106              SELECT username 
     107              FROM '.USERS_TABLE.' 
     108              WHERE id = '.$lcas_UserToUpdate.' 
     109            ;'; 
     110 
     111            $data = pwg_db_fetch_assoc(pwg_query($query)); 
     112   
    104113            // Username update 
    105114            $query = ' 
     
    114123            if (isset($conf_LCAS[1]) and $conf_LCAS[1] == 'true') 
    115124            { 
    116               LCAS_SendMail($lcas_UserToUpdate, $_POST['user-'.$lcas_UserToUpdate]); 
     125              LCAS_SendMail($lcas_UserToUpdate, $data['username'], $_POST['user-'.$lcas_UserToUpdate]); 
    117126            } 
     127 
    118128            // Reloading conflict table content 
    119129            $page['all_users'] = LCAS_get_user_list($conf_LCAS[0]); 
  • extensions/LCAS/trunk/include/functions.inc.php

    r9395 r9400  
    8787 
    8888/* Function called from LCAS_admin.php to send notification email */ 
    89 function LCAS_SendMail($id, $username) 
     89function LCAS_SendMail($id, $oldusername, $username) 
    9090{ 
    9191  global $conf; 
     
    117117  } 
    118118 
    119   $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Username_updated_for_%s', stripslashes($username))); 
     119  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Username_updated_for_%s', stripslashes($oldusername))); 
    120120 
    121121  if (isset($conf_LCAS[2]) and $conf_LCAS[2] <> '') 
     
    134134WHERE id = '.$id.' 
    135135;'; 
     136 
    136137  $data = pwg_db_fetch_assoc(pwg_query($query)); 
     138 
     139/* User standard information */ 
     140  $info = array( 
     141      get_l10n_args('LCAS_NewUsername: %s', stripslashes($username)), 
     142      get_l10n_args('LCAS_NewUser_Email: %s',$data['mail_address']), 
     143      get_l10n_args('', ''), 
     144    ); 
    137145 
    138146/* Send the email with subject and contents */ 
    139147  pwg_mail($data['mail_address'], array( 
    140148    'subject' => $subject, 
    141     'content' => ($customtxt), 
     149    'content' => ($customtxt."\n\n").(l10n_args($info)), 
    142150  )); 
    143151 
  • extensions/LCAS/trunk/language/en_UK/plugin.lang.php

    r9388 r9400  
    5050/* Email subject */ 
    5151$lang['Username_updated_for_%s'] = 'Username update for %s'; 
     52$lang['LCAS_NewUsername: %s'] = 'Your new username : %s'; 
     53$lang['LCAS_NewUser_Email: %s'] = 'Related to this email address : %s'; 
    5254?> 
  • extensions/LCAS/trunk/language/fr_FR/plugin.lang.php

    r9388 r9400  
    4848$lang['LCAS_EnableOption'] = ' Activer'; 
    4949 
    50 /* Email subject */ 
     50/* Emailing */ 
    5151$lang['Username_updated_for_%s'] = 'Nom d\'utilisateur mis à jour pour %s'; 
     52$lang['LCAS_NewUsername: %s'] = 'Votre nouveau nom d\'utilisateur : %s'; 
     53$lang['LCAS_NewUser_Email: %s'] = 'Correspondant à l\'adresse email : %s'; 
    5254?> 
Note: See TracChangeset for help on using the changeset viewer.