Changeset 14366


Ignore:
Timestamp:
04/24/12 21:18:13 (8 years ago)
Author:
Eric
Message:

Bug 2571 fixed - Piwigo 2.4 compliance : Information email removed on user registration because already managed by Piwigo
Bug 2619 fixed - Confirmation email when registered user changes his email was not sent and user not demoted

Merging from trunk to branch 2.4

Location:
extensions/UserAdvManager
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/branches/2.40/changelog.txt.php

    r14312 r14366  
    297297***** Plugin history (branch 2.40 - Piwigo 2.4 compliant)***** 
    298298************************************************************** 
    299 -- 2.40.0 : Bug 2570 fixed - Adding Wiki link to complete plugin documentation 
     299-- 2.40.0 : Bug 2570 fixed - Adding Wiki link to complete plugin documentation (FR only) 
     300            Bug 2571 fixed - Piwigo 2.4 compliance : Information email removed on user registration because already managed by Piwigo 
    300301            Bug 2591 fixed - Excluding Adult_Content generic users from users tracking list 
    301302            Bug 2603 fixed - Php notice when user changes his email in his profile if confirmation by email is set 
     303            Bug 2619 fixed - Confirmation email when registered user changes his email was not sent and user not demoted 
    302304*/ 
    303305?> 
  • extensions/UserAdvManager/branches/2.40/include/functions.inc.php

    r13842 r14366  
    101101  { 
    102102    $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    103      
    104     if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    105     { 
    106       // This is to send an information email and set user to "waiting" group or status until admin validation 
    107       // ----------------------------------------------------------------------------------------------------- 
    108       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
     103 
     104    if (isset($conf_UAM[1]) and $conf_UAM[1] == 'local') 
     105    { 
     106      // This is to set user to "waiting" group or status and without ConfirMail until admin validation 
     107      // ---------------------------------------------------------------------------------------------- 
    109108      SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation 
    110     } 
    111     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    112     { 
    113       // This is to set user to "waiting" group or status until admin validation 
    114       // ----------------------------------------------------------------------- 
    115       SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation 
    116     } 
    117     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'false')) 
    118     { 
    119       // This is to send an information email without validation key 
    120       // ----------------------------------------------------------- 
    121       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
    122109    } 
    123110    // Sending registration confirmation by email 
    124111    // ------------------------------------------ 
    125     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true' or $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
     112    elseif (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') 
    126113    { 
    127114      if (is_admin() and isset($conf_UAM[19]) and $conf_UAM[19] == 'true') 
     
    298285    } 
    299286 
    300     $typemail = 3; 
     287    $typemail = 3; // Only information email send to user on user profile update if checked 
    301288 
    302289    if (!empty($_POST['use_new_pwd'])) 
    303290    { 
    304       $typemail = 2; 
     291      $typemail = 2; // Confirmation email on user profile update - With information email if checked 
    305292 
    306293      // Password enforcement control 
     
    322309    // Sending registration confirmation by email 
    323310    // ------------------------------------------ 
    324     if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     311    if (/*(isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or */(isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    325312    { 
    326313      $confirm_mail_need = false; 
     
    339326        // ------------------------------------ 
    340327        if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
    341          
     328        { 
     329          SetPermission($user['id']);// Set to "waiting" group or status until user validation 
    342330          $confirm_mail_need = true; 
     331        } 
    343332 
    344333        // This is to set the user to "waiting" group or status until admin validation 
    345334        // --------------------------------------------------------------------------- 
    346         if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    347          
     335        elseif ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     336        { 
    348337          SetPermission($user['id']);// Set to "waiting" group or status until admin validation 
    349338          $confirm_mail_need = false; 
     339        }        
    350340      } 
    351341         
    352       if ((!empty($_POST['use_new_pwd']) and (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or $confirm_mail_need)) 
     342      if (((!empty($_POST['use_new_pwd']) and (isset($conf_UAM[0]) and $conf_UAM[0] == 'true')) or $confirm_mail_need)) 
    353343      { 
    354344        $query = ' 
     
    925915  switch($typemail) 
    926916  { 
    927     case 1: 
     917    case 1: // Confirmation email on user registration - Without information email (already managed by Piwigo) 
    928918      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Add of %s', stripslashes($username))); 
     919 
     920      break; 
     921       
     922    case 2: // Confirmation email on user profile update - With information email if checked 
     923      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username))); 
    929924      $password = $password <> '' ? $password : l10n('UAM_empty_pwd'); 
    930        
     925 
    931926      if (isset($conf_UAM[8]) and $conf_UAM[8] <> '') 
    932927      { 
     
    946941        else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n";  
    947942      } 
    948        
    949       break; 
    950        
    951     case 2: 
    952       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username))); 
    953       $password = $password <> '' ? $password : l10n('UAM_empty_pwd'); 
     943 
     944      if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') 
     945      { 
     946        if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email 
     947        { 
     948          $infos1 = array( 
     949            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     950            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     951            get_l10n_args('UAM_Password: %s', $password), 
     952            get_l10n_args('Email: %s', $email), 
     953            get_l10n_args('', ''), 
     954          ); 
     955        } 
     956        else // Do not allow display of clear password in email 
     957        { 
     958          $infos1 = array( 
     959            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     960            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     961            get_l10n_args('Email: %s', $email), 
     962            get_l10n_args('', ''), 
     963          ); 
     964        } 
     965      } 
    954966 
    955967      break; 
    956968         
    957     case 3: 
     969    case 3: // Only information email send to user if checked 
    958970      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username))); 
    959971      $password = $password <> '' ? $password : l10n('UAM_no_update_pwd'); 
    960972 
     973      if (isset($conf_UAM[8]) and $conf_UAM[8] <> '') 
     974      { 
     975        // Management of Extension flags ([username], [mygallery], [myurl]) 
     976        // ---------------------------------------------------------------- 
     977        $patterns[] = '#\[username\]#i'; 
     978        $replacements[] = $username; 
     979        $patterns[] = '#\[mygallery\]#i'; 
     980        $replacements[] = $conf['gallery_title']; 
     981        $patterns[] = '#\[myurl\]#i'; 
     982        $replacements[] = $conf['gallery_url']; 
     983     
     984        if (function_exists('get_user_language_desc')) 
     985        { 
     986          $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n"; 
     987        } 
     988        else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n";  
     989      } 
     990 
     991      if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') 
     992      { 
     993        if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email 
     994        { 
     995          $infos1 = array( 
     996            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     997            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     998            get_l10n_args('UAM_Password: %s', $password), 
     999            get_l10n_args('Email: %s', $email), 
     1000            get_l10n_args('', ''), 
     1001          ); 
     1002        } 
     1003        else // Do not allow display of clear password in email 
     1004        { 
     1005          $infos1 = array( 
     1006            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     1007            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     1008            get_l10n_args('Email: %s', $email), 
     1009            get_l10n_args('', ''), 
     1010          ); 
     1011        } 
     1012      } 
     1013 
    9611014      break; 
    962   } 
    963  
    964   if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') 
    965   { 
    966     if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email 
    967     { 
    968       $infos1 = array( 
    969         get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
    970         get_l10n_args('UAM_User: %s', stripslashes($username)), 
    971         get_l10n_args('UAM_Password: %s', $password), 
    972         get_l10n_args('Email: %s', $email), 
    973         get_l10n_args('', ''), 
    974       ); 
    975     } 
    976     else // Do not allow display of clear password in email 
    977     { 
    978       $infos1 = array( 
    979         get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
    980         get_l10n_args('UAM_User: %s', stripslashes($username)), 
    981         get_l10n_args('Email: %s', $email), 
    982         get_l10n_args('', ''), 
    983       ); 
    984     } 
    9851015  } 
    9861016 
     
    10181048  } 
    10191049 
    1020 // ******************************************************** 
    1021 // **** Pending code since to find how to make it work **** 
    1022 // ******************************************************** 
    1023 // Testing if FCK Editor is used. Then decoding htmlchars to avoid problems with pwg_mail() 
    1024 /*$areas = array(); 
    1025 array_push( $areas,'UAM_MailInfo_Text','UAM_ConfirmMail_Text'); 
    1026  
    1027 if (function_exists('set_fckeditor_instance')) 
    1028 { 
    1029   $fcke_config = unserialize($conf['FCKEditor']); 
    1030   foreach($areas as $area) 
    1031   { 
    1032     if (isset($fcke_config['UAM_MailInfo_Text']) and $fcke_config['UAM_MailInfo_Text'] = true) 
    1033     { 
    1034       $infos1_perso = html_entity_decode($infos1_perso,ENT_QUOTES,UTF-8); 
    1035     } 
    1036      
    1037     if (isset($fcke_config['UAM_ConfirmMail_Text']) and $fcke_config['UAM_ConfirmMail_Text'] = true) 
    1038     { 
    1039       $infos2_perso = html_entity_decode($infos2_perso,ENT_QUOTES,UTF-8); 
    1040     } 
    1041   } 
    1042 }*/ 
    1043  
    1044  
    10451050// Sending the email with subject and contents 
    10461051// ------------------------------------------- 
     
    10901095  switch($typemail) 
    10911096  { 
    1092     case 1: 
     1097    case 1: //Generating email content for remind with a new key 
    10931098      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Reminder_with_key_of_%s', $username)); 
    10941099       
     
    11341139                break; 
    11351140       
    1136     case 2: 
     1141    case 2: //Generating email content for remind without a new key 
    11371142      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Reminder_without_key_of_%s',$username)); 
    11381143       
  • extensions/UserAdvManager/branches/2.40/language/de_DE/help.lang.php

    r14312 r14366  
    2020$lang['UAM_passwadmTitle_d'] = 'Ein Administrator kann einen Benutzer-Account erstellen, mit oder ohne Anwendung der Regel der Komplexit&auml;t des Computings.<br><br> 
    2121Hinweis: Wenn der Benutzer erstellte Konto will Passwort zu &auml;ndern und Passwörter f&uuml;r die Benutzer St&auml;rkung aktiv ist, wird es vorbehaltlich der Regel-Satz.'; 
    22 $lang['UAM_infomailTitle_d'] = 'Diese Option erm&ouml;glicht die Automatisierung Senden einer E-Mail-Informationen an einen Benutzer bei der Anmeldung oder bei Änderungen sein Passwort oder E-Mail-Adresse in ihrem Profil.<br><br> 
     22$lang['UAM_infomailTitle_d'] = 'Diese Option erm&ouml;glicht die Automatisierung Senden einer E-Mail-Informationen an einen Benutzer bei Änderungen sein Passwort oder E-Mail-Adresse in ihrem Profil.<br><br> 
    2323Der Inhalt der Nachricht gesendet wird von einem anpassbaren Teil komponiert, um eine kleine Begrüßung und Einf&uuml;hrung fester Bestandteil in denen die Login, Passwort und E-Mail-Adresse des Benutzers.'; 
    2424$lang['UAM_confirmgrpTitle'] = 'Validation Gruppen'; 
  • extensions/UserAdvManager/branches/2.40/language/en_UK/help.lang.php

    r14312 r14366  
    1313$lang['UAM_passwadmTitle_d'] = 'An administrator can create a user account with or without application of the rule of computing complexity.<br><br> 
    1414Note: If the user account created wants to change password and strengthening passwords for users is active, it will be subject to the rule set.'; 
    15 $lang['UAM_infomailTitle_d'] = 'This option allows to automate sending an information email to a user when registering or when changes his password or email address in their profile.<br><br> 
     15$lang['UAM_infomailTitle_d'] = 'This option allows to automate sending an information email to a user when he changes his password or email address in his profile page.<br><br> 
    1616The content of the message sent is composed of a customizable part to introduce a little welcome note and a fixed part indicating the login name, password and email address of the user.'; 
    1717$lang['UAM_remailtxt1Title'] = 'Reminder email with new key generated'; 
  • extensions/UserAdvManager/branches/2.40/language/es_ES/help.lang.php

    r14312 r14366  
    2121$lang['UAM_passwadmTitle_d'] = 'Un administrador puede crear una cuenta de usuario, con o sin aplicación de la regla de la complejidad informática.<br><br> 
    2222Nota: Si el  usuario de la cuenta  creada quiere cambiar la contraseña, y el fortalecimiento de las contraseñas de los usuarios está activo, la misma estará sujeta a la norma establecida.'; 
    23 $lang['UAM_infomailTitle_d'] = 'Esta opción permite automatizar el envío de un correo electrónico y la información a un usuario cuando se registra o cuando cambie su contraseña o dirección de correo electrónico en su perfil.<br><br> 
     23$lang['UAM_infomailTitle_d'] = 'Esta opción permite automatizar el envío de un correo electrónico y la información a un usuario cuando cambie su contraseña o dirección de correo electrónico en su perfil.<br><br> 
    2424El contenido del mensaje enviado se compone de una parte personalizable para introducir una nota de bienvenida, y una parte fija que indica el inicio de sesión, contraseña y dirección de correo electrónico del usuario.'; 
    2525$lang['UAM_confirmgrpTitle'] = 'Grupos de validación'; 
  • extensions/UserAdvManager/branches/2.40/language/fr_FR/help.lang.php

    r14312 r14366  
    1212$lang['UAM_passwadmTitle_d'] = 'Un administrateur peut créer un compte d\'utilisateur avec ou sans application de la règle de calcul de complexité.<br><br> 
    1313A noter : Si l\'utilisateur du compte ainsi créé désire changer de mot de passe et que le renforcement des mots de passe pour les utilisateurs est actif, il sera soumis à la règle configurée.'; 
    14 $lang['UAM_infomailTitle_d'] = 'Cette option permet d\'automatiser l\'envoi d\'un email d\'information à un utilisateur lorsqu\'il s\'inscrit ou modifie son mot de passe ou son adresse de messagerie dans son profil.<br><br> 
     14$lang['UAM_infomailTitle_d'] = 'Cette option permet d\'automatiser l\'envoi d\'un email d\'information à un utilisateur lorsqu\'il modifie son mot de passe ou son adresse de messagerie dans son profil.<br><br> 
    1515Le message envoyé comprend une partie fixe (login, mot de passe et adresse email de l\'utilisateur) et une partie personnalisable par un texte d\'accueil.'; 
    1616$lang['UAM_remailtxt1Title'] = 'Message de rappel avec regénération de clé'; 
  • extensions/UserAdvManager/branches/2.40/language/it_IT/help.lang.php

    r14312 r14366  
    2121$lang['UAM_passwadmTitle_d'] = 'Un amministratore può creare un\'pseudo con o senza l\'applicazione della regola della complessità di calcolo.<br><br> 
    2222Nota: Se l\'account utente creato vuole cambiare la password e il rafforzamento password per gli utenti è attivo, sarà soggetta alla regola.'; 
    23 $lang['UAM_infomailTitle_d'] = 'Questa opzione consente di automatizzare l\'invio di una e-mail le informazioni a un utente al momento dell\'iscrizione o quando cambia la sua password o indirizzo e-mail nel loro profilo.<br><br> 
     23$lang['UAM_infomailTitle_d'] = 'Questa opzione consente di automatizzare l\'invio di una e-mail le informazioni a un utente quando cambia la sua password o indirizzo e-mail nel loro profilo.<br><br> 
    2424Il contenuto del messaggio inviato è composto da una parte personalizzabile di introdurre una piccola nota di benvenuto e una parte fissa che indica il login, password e indirizzo di posta elettronica dell\'utente.'; 
    2525 
  • extensions/UserAdvManager/branches/2.40/language/lv_LV/help.lang.php

    r14312 r14366  
    2222$lang['UAM_passwadmTitle_d'] = 'Administrators var izveidot lietotāja kontu ar vai bez paroles komplicētības pārbaudes aplikāciju.<br><br> 
    2323Note: Ja lietotājs, kura konts jau izveidots, grib nomainīt savu paroli un ir aktīva paroles stingrības uzlabišanas aplikācija, būs jāievēro visi stingrības uzlabošanas noteikumi.'; 
    24 $lang['UAM_infomailTitle_d'] = 'Šī opcija ļauj automātiski ar e-pastu nosūtīt lietotājam informatīvu ziņu par reģistrāciju vai profila paroles vai e-pasta adreses maiņu.<br><br> 
    25 Nosūtāmā ziņa kompozicionāli sastāv no pielāgojamās daļas, maza ievada un fiksētās daļas, kas ietver info par lietotāja loginu, paroli un e-pasta adresi.'; 
    2624$lang['UAM_confirmgrpTitle'] = 'Pārbaudāmās Grupas'; 
    2725$lang['UAM_confirmgrpTitle_d'] = '<b style=&quot;color: 
  • extensions/UserAdvManager/trunk/changelog.txt.php

    r14311 r14366  
    297297***** Plugin history (branch 2.40 - Piwigo 2.4 compliant)***** 
    298298************************************************************** 
    299 -- 2.40.0 : Bug 2570 fixed - Adding Wiki link to complete plugin documentation 
     299-- 2.40.0 : Bug 2570 fixed - Adding Wiki link to complete plugin documentation (FR only) 
     300            Bug 2571 fixed - Piwigo 2.4 compliance : Information email removed on user registration because already managed by Piwigo 
    300301            Bug 2591 fixed - Excluding Adult_Content generic users from users tracking list 
    301302            Bug 2603 fixed - Php notice when user changes his email in his profile if confirmation by email is set 
     303            Bug 2619 fixed - Confirmation email when registered user changes his email was not sent and user not demoted 
    302304*/ 
    303305?> 
  • extensions/UserAdvManager/trunk/include/functions.inc.php

    r13841 r14366  
    101101  { 
    102102    $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 
    103      
    104     if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    105     { 
    106       // This is to send an information email and set user to "waiting" group or status until admin validation 
    107       // ----------------------------------------------------------------------------------------------------- 
    108       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
     103 
     104    if (isset($conf_UAM[1]) and $conf_UAM[1] == 'local') 
     105    { 
     106      // This is to set user to "waiting" group or status and without ConfirMail until admin validation 
     107      // ---------------------------------------------------------------------------------------------- 
    109108      SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation 
    110     } 
    111     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    112     { 
    113       // This is to set user to "waiting" group or status until admin validation 
    114       // ----------------------------------------------------------------------- 
    115       SetPermission($register_user['id']);// Set to "waiting" group or status until admin validation 
    116     } 
    117     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'false')) 
    118     { 
    119       // This is to send an information email without validation key 
    120       // ----------------------------------------------------------- 
    121       SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], false); 
    122109    } 
    123110    // Sending registration confirmation by email 
    124111    // ------------------------------------------ 
    125     elseif ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true' or $conf_UAM[0] == 'false') and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
     112    elseif (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') 
    126113    { 
    127114      if (is_admin() and isset($conf_UAM[19]) and $conf_UAM[19] == 'true') 
     
    298285    } 
    299286 
    300     $typemail = 3; 
     287    $typemail = 3; // Only information email send to user on user profile update if checked 
    301288 
    302289    if (!empty($_POST['use_new_pwd'])) 
    303290    { 
    304       $typemail = 2; 
     291      $typemail = 2; // Confirmation email on user profile update - With information email if checked 
    305292 
    306293      // Password enforcement control 
     
    322309    // Sending registration confirmation by email 
    323310    // ------------------------------------------ 
    324     if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     311    if (/*(isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or */(isset($conf_UAM[1]) and $conf_UAM[1] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    325312    { 
    326313      $confirm_mail_need = false; 
     
    339326        // ------------------------------------ 
    340327        if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 
    341          
     328        { 
     329          SetPermission($user['id']);// Set to "waiting" group or status until user validation 
    342330          $confirm_mail_need = true; 
     331        } 
    343332 
    344333        // This is to set the user to "waiting" group or status until admin validation 
    345334        // --------------------------------------------------------------------------- 
    346         if ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
    347          
     335        elseif ($_POST['mail_address'] != $current_email and (isset($conf_UAM[1]) and $conf_UAM[1] == 'local')) 
     336        { 
    348337          SetPermission($user['id']);// Set to "waiting" group or status until admin validation 
    349338          $confirm_mail_need = false; 
     339        }        
    350340      } 
    351341         
    352       if ((!empty($_POST['use_new_pwd']) and (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or $confirm_mail_need)) 
     342      if (((!empty($_POST['use_new_pwd']) and (isset($conf_UAM[0]) and $conf_UAM[0] == 'true')) or $confirm_mail_need)) 
    353343      { 
    354344        $query = ' 
     
    925915  switch($typemail) 
    926916  { 
    927     case 1: 
     917    case 1: // Confirmation email on user registration - Without information email (already managed by Piwigo) 
    928918      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Add of %s', stripslashes($username))); 
     919 
     920      break; 
     921       
     922    case 2: // Confirmation email on user profile update - With information email if checked 
     923      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username))); 
    929924      $password = $password <> '' ? $password : l10n('UAM_empty_pwd'); 
    930        
     925 
    931926      if (isset($conf_UAM[8]) and $conf_UAM[8] <> '') 
    932927      { 
     
    946941        else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n";  
    947942      } 
    948        
    949       break; 
    950        
    951     case 2: 
    952       $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username))); 
    953       $password = $password <> '' ? $password : l10n('UAM_empty_pwd'); 
     943 
     944      if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') 
     945      { 
     946        if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email 
     947        { 
     948          $infos1 = array( 
     949            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     950            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     951            get_l10n_args('UAM_Password: %s', $password), 
     952            get_l10n_args('Email: %s', $email), 
     953            get_l10n_args('', ''), 
     954          ); 
     955        } 
     956        else // Do not allow display of clear password in email 
     957        { 
     958          $infos1 = array( 
     959            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     960            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     961            get_l10n_args('Email: %s', $email), 
     962            get_l10n_args('', ''), 
     963          ); 
     964        } 
     965      } 
    954966 
    955967      break; 
    956968         
    957     case 3: 
     969    case 3: // Only information email send to user if checked 
    958970      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Update of %s', stripslashes($username))); 
    959971      $password = $password <> '' ? $password : l10n('UAM_no_update_pwd'); 
    960972 
     973      if (isset($conf_UAM[8]) and $conf_UAM[8] <> '') 
     974      { 
     975        // Management of Extension flags ([username], [mygallery], [myurl]) 
     976        // ---------------------------------------------------------------- 
     977        $patterns[] = '#\[username\]#i'; 
     978        $replacements[] = $username; 
     979        $patterns[] = '#\[mygallery\]#i'; 
     980        $replacements[] = $conf['gallery_title']; 
     981        $patterns[] = '#\[myurl\]#i'; 
     982        $replacements[] = $conf['gallery_url']; 
     983     
     984        if (function_exists('get_user_language_desc')) 
     985        { 
     986          $infos1_perso = get_user_language_desc(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n"; 
     987        } 
     988        else $infos1_perso = l10n(preg_replace($patterns, $replacements, $conf_UAM[8]))."\n\n";  
     989      } 
     990 
     991      if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') 
     992      { 
     993        if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email 
     994        { 
     995          $infos1 = array( 
     996            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     997            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     998            get_l10n_args('UAM_Password: %s', $password), 
     999            get_l10n_args('Email: %s', $email), 
     1000            get_l10n_args('', ''), 
     1001          ); 
     1002        } 
     1003        else // Do not allow display of clear password in email 
     1004        { 
     1005          $infos1 = array( 
     1006            get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
     1007            get_l10n_args('UAM_User: %s', stripslashes($username)), 
     1008            get_l10n_args('Email: %s', $email), 
     1009            get_l10n_args('', ''), 
     1010          ); 
     1011        } 
     1012      } 
     1013 
    9611014      break; 
    962   } 
    963  
    964   if (isset($conf_UAM[0]) and $conf_UAM[0] == 'true') 
    965   { 
    966     if (isset($conf_UAM[34]) and $conf_UAM[34] == 'true') // Allow display of clear password in email 
    967     { 
    968       $infos1 = array( 
    969         get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
    970         get_l10n_args('UAM_User: %s', stripslashes($username)), 
    971         get_l10n_args('UAM_Password: %s', $password), 
    972         get_l10n_args('Email: %s', $email), 
    973         get_l10n_args('', ''), 
    974       ); 
    975     } 
    976     else // Do not allow display of clear password in email 
    977     { 
    978       $infos1 = array( 
    979         get_l10n_args('UAM_infos_mail %s', stripslashes($username)), 
    980         get_l10n_args('UAM_User: %s', stripslashes($username)), 
    981         get_l10n_args('Email: %s', $email), 
    982         get_l10n_args('', ''), 
    983       ); 
    984     } 
    9851015  } 
    9861016 
     
    10181048  } 
    10191049 
    1020 // ******************************************************** 
    1021 // **** Pending code since to find how to make it work **** 
    1022 // ******************************************************** 
    1023 // Testing if FCK Editor is used. Then decoding htmlchars to avoid problems with pwg_mail() 
    1024 /*$areas = array(); 
    1025 array_push( $areas,'UAM_MailInfo_Text','UAM_ConfirmMail_Text'); 
    1026  
    1027 if (function_exists('set_fckeditor_instance')) 
    1028 { 
    1029   $fcke_config = unserialize($conf['FCKEditor']); 
    1030   foreach($areas as $area) 
    1031   { 
    1032     if (isset($fcke_config['UAM_MailInfo_Text']) and $fcke_config['UAM_MailInfo_Text'] = true) 
    1033     { 
    1034       $infos1_perso = html_entity_decode($infos1_perso,ENT_QUOTES,UTF-8); 
    1035     } 
    1036      
    1037     if (isset($fcke_config['UAM_ConfirmMail_Text']) and $fcke_config['UAM_ConfirmMail_Text'] = true) 
    1038     { 
    1039       $infos2_perso = html_entity_decode($infos2_perso,ENT_QUOTES,UTF-8); 
    1040     } 
    1041   } 
    1042 }*/ 
    1043  
    1044  
    10451050// Sending the email with subject and contents 
    10461051// ------------------------------------------- 
     
    10901095  switch($typemail) 
    10911096  { 
    1092     case 1: 
     1097    case 1: //Generating email content for remind with a new key 
    10931098      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Reminder_with_key_of_%s', $username)); 
    10941099       
     
    11341139                break; 
    11351140       
    1136     case 2: 
     1141    case 2: //Generating email content for remind without a new key 
    11371142      $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('UAM_Reminder_without_key_of_%s',$username)); 
    11381143       
  • extensions/UserAdvManager/trunk/language/de_DE/help.lang.php

    r14311 r14366  
    2020$lang['UAM_passwadmTitle_d'] = 'Ein Administrator kann einen Benutzer-Account erstellen, mit oder ohne Anwendung der Regel der Komplexit&auml;t des Computings.<br><br> 
    2121Hinweis: Wenn der Benutzer erstellte Konto will Passwort zu &auml;ndern und Passwörter f&uuml;r die Benutzer St&auml;rkung aktiv ist, wird es vorbehaltlich der Regel-Satz.'; 
    22 $lang['UAM_infomailTitle_d'] = 'Diese Option erm&ouml;glicht die Automatisierung Senden einer E-Mail-Informationen an einen Benutzer bei der Anmeldung oder bei Änderungen sein Passwort oder E-Mail-Adresse in ihrem Profil.<br><br> 
     22$lang['UAM_infomailTitle_d'] = 'Diese Option erm&ouml;glicht die Automatisierung Senden einer E-Mail-Informationen an einen Benutzer bei Änderungen sein Passwort oder E-Mail-Adresse in ihrem Profil.<br><br> 
    2323Der Inhalt der Nachricht gesendet wird von einem anpassbaren Teil komponiert, um eine kleine Begrüßung und Einf&uuml;hrung fester Bestandteil in denen die Login, Passwort und E-Mail-Adresse des Benutzers.'; 
    2424$lang['UAM_confirmgrpTitle'] = 'Validation Gruppen'; 
  • extensions/UserAdvManager/trunk/language/en_UK/help.lang.php

    r14311 r14366  
    1313$lang['UAM_passwadmTitle_d'] = 'An administrator can create a user account with or without application of the rule of computing complexity.<br><br> 
    1414Note: If the user account created wants to change password and strengthening passwords for users is active, it will be subject to the rule set.'; 
    15 $lang['UAM_infomailTitle_d'] = 'This option allows to automate sending an information email to a user when registering or when changes his password or email address in their profile.<br><br> 
     15$lang['UAM_infomailTitle_d'] = 'This option allows to automate sending an information email to a user when he changes his password or email address in his profile page.<br><br> 
    1616The content of the message sent is composed of a customizable part to introduce a little welcome note and a fixed part indicating the login name, password and email address of the user.'; 
    1717$lang['UAM_remailtxt1Title'] = 'Reminder email with new key generated'; 
  • extensions/UserAdvManager/trunk/language/es_ES/help.lang.php

    r14311 r14366  
    2121$lang['UAM_passwadmTitle_d'] = 'Un administrador puede crear una cuenta de usuario, con o sin aplicación de la regla de la complejidad informática.<br><br> 
    2222Nota: Si el  usuario de la cuenta  creada quiere cambiar la contraseña, y el fortalecimiento de las contraseñas de los usuarios está activo, la misma estará sujeta a la norma establecida.'; 
    23 $lang['UAM_infomailTitle_d'] = 'Esta opción permite automatizar el envío de un correo electrónico y la información a un usuario cuando se registra o cuando cambie su contraseña o dirección de correo electrónico en su perfil.<br><br> 
     23$lang['UAM_infomailTitle_d'] = 'Esta opción permite automatizar el envío de un correo electrónico y la información a un usuario cuando cambie su contraseña o dirección de correo electrónico en su perfil.<br><br> 
    2424El contenido del mensaje enviado se compone de una parte personalizable para introducir una nota de bienvenida, y una parte fija que indica el inicio de sesión, contraseña y dirección de correo electrónico del usuario.'; 
    2525$lang['UAM_confirmgrpTitle'] = 'Grupos de validación'; 
  • extensions/UserAdvManager/trunk/language/fr_FR/help.lang.php

    r14311 r14366  
    1212$lang['UAM_passwadmTitle_d'] = 'Un administrateur peut créer un compte d\'utilisateur avec ou sans application de la règle de calcul de complexité.<br><br> 
    1313A noter : Si l\'utilisateur du compte ainsi créé désire changer de mot de passe et que le renforcement des mots de passe pour les utilisateurs est actif, il sera soumis à la règle configurée.'; 
    14 $lang['UAM_infomailTitle_d'] = 'Cette option permet d\'automatiser l\'envoi d\'un email d\'information à un utilisateur lorsqu\'il s\'inscrit ou modifie son mot de passe ou son adresse de messagerie dans son profil.<br><br> 
     14$lang['UAM_infomailTitle_d'] = 'Cette option permet d\'automatiser l\'envoi d\'un email d\'information à un utilisateur lorsqu\'il modifie son mot de passe ou son adresse de messagerie dans son profil.<br><br> 
    1515Le message envoyé comprend une partie fixe (login, mot de passe et adresse email de l\'utilisateur) et une partie personnalisable par un texte d\'accueil.'; 
    1616$lang['UAM_remailtxt1Title'] = 'Message de rappel avec regénération de clé'; 
  • extensions/UserAdvManager/trunk/language/it_IT/help.lang.php

    r14311 r14366  
    2121$lang['UAM_passwadmTitle_d'] = 'Un amministratore può creare un\'pseudo con o senza l\'applicazione della regola della complessità di calcolo.<br><br> 
    2222Nota: Se l\'account utente creato vuole cambiare la password e il rafforzamento password per gli utenti è attivo, sarà soggetta alla regola.'; 
    23 $lang['UAM_infomailTitle_d'] = 'Questa opzione consente di automatizzare l\'invio di una e-mail le informazioni a un utente al momento dell\'iscrizione o quando cambia la sua password o indirizzo e-mail nel loro profilo.<br><br> 
     23$lang['UAM_infomailTitle_d'] = 'Questa opzione consente di automatizzare l\'invio di una e-mail le informazioni a un utente quando cambia la sua password o indirizzo e-mail nel loro profilo.<br><br> 
    2424Il contenuto del messaggio inviato è composto da una parte personalizzabile di introdurre una piccola nota di benvenuto e una parte fissa che indica il login, password e indirizzo di posta elettronica dell\'utente.'; 
    2525 
  • extensions/UserAdvManager/trunk/language/lv_LV/help.lang.php

    r14311 r14366  
    2222$lang['UAM_passwadmTitle_d'] = 'Administrators var izveidot lietotāja kontu ar vai bez paroles komplicētības pārbaudes aplikāciju.<br><br> 
    2323Note: Ja lietotājs, kura konts jau izveidots, grib nomainīt savu paroli un ir aktīva paroles stingrības uzlabišanas aplikācija, būs jāievēro visi stingrības uzlabošanas noteikumi.'; 
    24 $lang['UAM_infomailTitle_d'] = 'Šī opcija ļauj automātiski ar e-pastu nosūtīt lietotājam informatīvu ziņu par reģistrāciju vai profila paroles vai e-pasta adreses maiņu.<br><br> 
    25 Nosūtāmā ziņa kompozicionāli sastāv no pielāgojamās daļas, maza ievada un fiksētās daļas, kas ietver info par lietotāja loginu, paroli un e-pasta adresi.'; 
    2624$lang['UAM_confirmgrpTitle'] = 'Pārbaudāmās Grupas'; 
    2725$lang['UAM_confirmgrpTitle_d'] = '<b style=&quot;color: 
Note: See TracChangeset for help on using the changeset viewer.