Changeset 4061
- Timestamp:
- Oct 19, 2009, 6:22:25 PM (15 years ago)
- Location:
- extensions/NBC_UserAdvManager/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/admin/UserAdvManager_admin.php
r3920 r4061 41 41 $page['global'] = array(); 42 42 $error = array(); 43 $UserAdvManager_Password_Test_Score = 0; 43 44 44 45 // +-----------------------------------------------------------------------+ … … 55 56 case 'global': 56 57 57 if ( isset($_POST['submit']) and !is_adviser() and isset($_POST['UserAdvManager_Mail_Info']) and isset($_POST['UserAdvManager_No_Casse']) and isset($_POST['UserAdvManager_Username_Char']) and isset($_POST['UserAdvManager_Confirm_Mail']) and isset($_POST['UserAdvManager_No_Comment_Anonymous']))58 if (isset($_POST['submit']) and !is_adviser() and isset($_POST['UserAdvManager_Mail_Info']) and isset($_POST['UserAdvManager_No_Casse']) and isset($_POST['UserAdvManager_Username_Char']) and isset($_POST['UserAdvManager_Confirm_Mail']) and isset($_POST['UserAdvManager_No_Comment_Anonymous']) and isset($_POST['UserAdvManager_Password_Enforced'])) 58 59 { 59 60 $_POST['UserAdvManager_MailInfo_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_MailInfo_Text'])); 60 61 $_POST['UserAdvManager_ConfirmMail_Text'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UserAdvManager_ConfirmMail_Text'])); 61 62 62 $newconf_nbc_UserAdvManager = $_POST['UserAdvManager_Mail_Info'].';'.$_POST['UserAdvManager_No_Casse'].';'.$_POST['UserAdvManager_Confirm_Mail'].';'.(isset($_POST['UserAdvManager_No_Confirm_Group'])?$_POST['UserAdvManager_No_Confirm_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Group'])?$_POST['UserAdvManager_Validated_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Status'])?$_POST['UserAdvManager_Validated_Status']:'').';'.$_POST['UserAdvManager_No_Comment_Anonymous'].';'.$_POST['UserAdvManager_Username_Char'].';'.$_POST['UserAdvManager_Username_List'].';'.(isset($_POST['UserAdvManager_No_Confirm_Status'])?$_POST['UserAdvManager_No_Confirm_Status']:'').';'.$_POST['UserAdvManager_MailInfo_Text'].';'.$_POST['UserAdvManager_ConfirmMail_Text'].';'.$_POST['UserAdvManager_MailExclusion'].';'.$_POST['UserAdvManager_MailExclusion_List'] ;63 $newconf_nbc_UserAdvManager = $_POST['UserAdvManager_Mail_Info'].';'.$_POST['UserAdvManager_No_Casse'].';'.$_POST['UserAdvManager_Confirm_Mail'].';'.(isset($_POST['UserAdvManager_No_Confirm_Group'])?$_POST['UserAdvManager_No_Confirm_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Group'])?$_POST['UserAdvManager_Validated_Group']:'').';'.(isset($_POST['UserAdvManager_Validated_Status'])?$_POST['UserAdvManager_Validated_Status']:'').';'.$_POST['UserAdvManager_No_Comment_Anonymous'].';'.$_POST['UserAdvManager_Username_Char'].';'.$_POST['UserAdvManager_Username_List'].';'.(isset($_POST['UserAdvManager_No_Confirm_Status'])?$_POST['UserAdvManager_No_Confirm_Status']:'').';'.$_POST['UserAdvManager_MailInfo_Text'].';'.$_POST['UserAdvManager_ConfirmMail_Text'].';'.$_POST['UserAdvManager_MailExclusion'].';'.$_POST['UserAdvManager_MailExclusion_List'].';'.$_POST['UserAdvManager_Password_Enforced'].';'.$_POST['UserAdvManager_Password_Score']; 63 64 64 65 $conf['nbc_UserAdvManager'] = $newconf_nbc_UserAdvManager; … … 74 75 75 76 array_push($page['infos'], l10n('UserAdvManager_save_config')); 77 } 78 79 if (isset($_POST['PasswordTest']) and !is_adviser() and isset($_POST['UserAdvManager_Password_Test']) and !empty($_POST['UserAdvManager_Password_Test'])) 80 { 81 $UserAdvManager_Password_Test_Score = testpassword($_POST['UserAdvManager_Password_Test']); 82 } 83 else if (isset($_POST['PasswordTest']) and !is_adviser() and empty($_POST['UserAdvManager_Password_Test'])) 84 { 85 array_push($page['errors'], l10n('reg_err_login3')); 76 86 } 77 87 … … 189 199 'UserAdvManager_MAILEXCLUSION_FALSE' => $conf_nbc_UserAdvManager[12]=='false' ? 'checked="checked"' : '' , 190 200 'UserAdvManager_MAILEXCLUSION_LIST' => $conf_nbc_UserAdvManager[13], 201 'UserAdvManager_PASSWORDENF_TRUE' => $conf_nbc_UserAdvManager[14]=='true' ? 'checked="checked"' : '' , 202 'UserAdvManager_PASSWORDENF_FALSE' => $conf_nbc_UserAdvManager[14]=='false' ? 'checked="checked"' : '' , 203 'UserAdvManager_PASSWORD_SCORE' => $conf_nbc_UserAdvManager[15], 204 'UserAdvManager_PASSWORD_TEST_SCORE' => $UserAdvManager_Password_Test_Score, 191 205 ) 192 206 ); -
extensions/NBC_UserAdvManager/trunk/admin/global.tpl
r3982 r4061 7 7 <legend>{'UserAdvManager_Title'|@translate}</legend> 8 8 <ul> 9 <li><label>{'UserAdvManager_Mail_Info'|@translate}</label><br/>10 <input type="radio" value="true" {$UserAdvManager_MAIL_INFO_TRUE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_true'|@translate}<br>11 <input type="radio" value="false" {$UserAdvManager_MAIL_INFO_FALSE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_false'|@translate}<br>12 <br>13 </li>14 <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br>15 <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea>16 <br><br>17 </li>18 9 <li><label>{'UserAdvManager_No_Casse'|@translate}</label><br> 19 10 <input type="radio" value="true" {$UserAdvManager_NO_CASSE_TRUE} name="UserAdvManager_No_Casse"/>{'UserAdvManager_No_Casse_true'|@translate}<br> … … 26 17 <input type="radio" value="false" {$UserAdvManager_USERNAME_CHAR_FALSE} name="UserAdvManager_Username_Char"/>{'UserAdvManager_Username_Char_false'|@translate}<br> 27 18 <br> 19 </li> 20 <li><label>{'UserAdvManager_Password_Enforced'|@translate}</label><br/> 21 <input type="radio" value="true" {$UserAdvManager_PASSWORDENF_TRUE} name="UserAdvManager_Password_Enforced"/>{'UserAdvManager_Password_Enforced_true'|@translate} 22 <input type="text" name="UserAdvManager_Password_Score" value="{$UserAdvManager_PASSWORD_SCORE}" size="5" style="text-align: center;"/><br><br> 23 24 <label>{'UserAdvManager_Password_Enforced_Info'|@translate}</label><br><br> 25 {'UserAdvManager_PasswordTest'|@translate}<input type="text" name="UserAdvManager_Password_Test" value="{$UserAdvManager_PASSWORD_TEST}" size="50" style="text-align: left;"/> 26 <input class="submit" type="submit" value="{'PasswordTest'|@translate}" name="PasswordTest" > 27 {'UserAdvManager_ScoreTest'|@translate}{$UserAdvManager_PASSWORD_TEST_SCORE}<br><br> 28 {if isset($PasswordTest) && empty($UserAdvManager_PASSWORD_TEST)} 29 <label>{'reg_err_login3'|@translate}</label> 30 {/if} 31 32 <input type="radio" value="false" {$UserAdvManager_PASSWORDENF_FALSE} name="UserAdvManager_Password_Enforced"/>{'UserAdvManager_Password_Enforced_false'|@translate}<br> 33 <br> 34 </li> 35 <li><label>{'UserAdvManager_Mail_Info'|@translate}</label><br/> 36 <input type="radio" value="true" {$UserAdvManager_MAIL_INFO_TRUE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_true'|@translate}<br> 37 <input type="radio" value="false" {$UserAdvManager_MAIL_INFO_FALSE} name="UserAdvManager_Mail_Info"/>{'UserAdvManager_Mail_Info_false'|@translate}<br> 38 <br> 39 </li> 40 <li><label>{'UserAdvManager_MailInfo_Text'|@translate}</label><br><br> 41 <textarea name="UserAdvManager_MailInfo_Text" id="UserAdvManager_MailInfo_Text" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UserAdvManager_MAILINFO_TEXT}</textarea> 42 <br><br> 28 43 </li> 29 44 <li><label>{'UserAdvManager_Confirm_Mail'|@translate}</label><br> -
extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl
r3920 r4061 18 18 <td>{'Email address'|@translate}</td> 19 19 <td>{'Groups'|@translate}</td> 20 <td>{'Registration '|@translate}</td>20 <td>{'Registration_Date'|@translate}</td> 21 21 </tr> 22 22 </thead> -
extensions/NBC_UserAdvManager/trunk/include/functions_UserAdvManager.inc.php
r3982 r4061 535 535 536 536 /* Obsolete function - Check for single email in database */ 537 function SearchMail($email)538 {539 global $conf, $lang;540 541 if (isset($email))542 {543 $query = "544 SELECT COUNT(*)545 FROM ".USERS_TABLE."546 WHERE ".$conf['user_fields']['email']." = '".$email."'547 ;";548 list($nbr_mail) = mysql_fetch_row(pwg_query($query));549 550 return isset($nbr_mail) ? $nbr_mail : 0;551 }552 }537 //function SearchMail($email) 538 //{ 539 // global $conf, $lang; 540 // 541 // if (isset($email)) 542 // { 543 // $query = " 544 // SELECT COUNT(*) 545 // FROM ".USERS_TABLE." 546 // WHERE ".$conf['user_fields']['email']." = '".$email."' 547 // ;"; 548 // list($nbr_mail) = mysql_fetch_row(pwg_query($query)); 549 // 550 // return isset($nbr_mail) ? $nbr_mail : 0; 551 // } 552 //} 553 553 554 554 … … 577 577 /* Obsolete function - Check for no forbidden email provider */ 578 578 /* This don't work on function call */ 579 function ValidateEmailProvider($email)580 {581 global $conf;582 583 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array();584 if (isset($conf_nbc_UserAdvManager[12]))585 {586 $ncsemail = strtolower($email);587 $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]);588 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++)589 {590 $pattern = '/'.$conf_nbc_MailExclusion[$i].'/';591 if (preg_match($pattern, $ncsemail))592 return false;593 else594 return true;595 }596 }597 }579 //function ValidateEmailProvider($email) 580 //{ 581 // global $conf; 582 // 583 // $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); 584 // if (isset($conf_nbc_UserAdvManager[12])) 585 // { 586 // $ncsemail = strtolower($email); 587 // $conf_nbc_MailExclusion = preg_split('/,/',$conf_nbc_UserAdvManager[13]); 588 // for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 589 // { 590 // $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 591 // if (preg_match($pattern, $ncsemail)) 592 // return false; 593 // else 594 // return true; 595 // } 596 // } 597 //} 598 598 599 599 … … 735 735 } 736 736 } 737 738 /** 739 * Returns a password's score for password complexity check 740 * 741 * @param password entered 742 * 743 * Thanx to MathieuGut from http://m-gut.developpez.com 744 */ 745 function testpassword($password) { // Le mot de passe passé en paramètre - $password given by user 746 747 // Initialisation des variables - Variables initiation 748 $points = 0; 749 $point_lowercase = 0; 750 $point_uppercase = 0; 751 $point_numbers = 0; 752 $point_characters = 0; 753 754 // On récupère la longueur du mot de passe - Getting password lengh 755 $length = strlen($password); 756 757 // On fait une boucle pour lire chaque lettre - Loop to read password characters 758 for($i = 0; $i < $length; $i++) { 759 760 // On sélectionne une à une chaque lettre - Select each letters 761 // $i étant à 0 lors du premier passage de la boucle - $i is 0 at first turn 762 $letters = $password[$i]; 763 764 if ($letters>='a' && $letters<='z'){ 765 // On ajoute 1 point pour une minuscule - Adding 1 point to score for a lowercase 766 $points = $points + 1; 767 768 // On rajoute le bonus pour une minuscule - Adding bonus points for lowercase 769 $point_lowercase = 1; 770 } 771 else if ($letters>='A' && $letters <='Z'){ 772 // On ajoute 2 points pour une majuscule - Adding 2 points to score for uppercase 773 $points = $points + 2; 774 775 // On rajoute le bonus pour une majuscule - Adding bonus points for uppercase 776 $point_uppercase = 2; 777 } 778 else if ($letters>='0' && $letters<='9'){ 779 // On ajoute 3 points pour un chiffre - Adding 3 points to score for numbers 780 $points = $points + 3; 781 782 // On rajoute le bonus pour un chiffre - Adding bonus points for numbers 783 $point_numbers = 3; 784 } 785 else { 786 // On ajoute 5 points pour un caractère autre - Adding 5 points to score for special characters 787 $points = $points + 5; 788 789 // On rajoute le bonus pour un caractère autre - Adding bonus points for special characters 790 $point_characters = 5; 791 } 792 } 793 794 // Calcul du coefficient points/longueur - calculating the coefficient points / length 795 $step1 = $points / $length; 796 797 // Calcul du coefficient de la diversité des types de caractères... - Calculation of the diversity of character types... 798 $step2 = $point_lowercase + $point_uppercase + $point_numbers + $point_characters; 799 800 // Multiplication du coefficient de diversité avec celui de la longueur - Multiplying the coefficient of diversity with that of the length 801 $score = $step1 * $step2; 802 803 // Multiplication du résultat par la longueur de la chaîne - Multiplying the result by the length of the chain 804 $finalscore = $score * $length; 805 806 return $finalscore; 807 } 737 808 ?> -
extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php
r3982 r4061 57 57 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Enable email reminder'; 58 58 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Disable email reminder'; 59 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the recall message with regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br> <b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>';60 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the recall message without regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br> <b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">WARNING !</b> <b style="color: red;">Text modification is available ONLY if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)</b>';59 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Custom content of the recall message with regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Text modification is available <b>ONLY</b> if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 60 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Custom content of the recall message without regeneration of validation key.<br>If left blank, the recall mail will include only the validation link. It is therefore strongly advised to take a little explanatory text. (NB: The text pre-filled with the installation of the plugin is given as an example)<br><br>(!!! <b style="text-decoration: blink underline;">WARNING !</b> Text modification is available <b>ONLY</b> if email reminder is enabled. Use the multi language tags from Extended Description plugin if this plugin is activated !!!)'; 61 61 62 62 … … 74 74 - Submit a registration awaiting validation manually even if the expiry date has passed <b>(forcing validation)</b>. 75 75 <br>'; 76 $lang['Registration '] = 'Registration date';76 $lang['Registration_Date'] = 'Registration date'; 77 77 78 78 -
extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php
r3982 r4061 20 20 $lang['UserAdvManager_Username_Char_true'] = ' Interdire les caractères saisis dans le champs ci-après pour le nom d\'utilisateur lors de l\'inscription == '; 21 21 $lang['UserAdvManager_Username_Char_false'] = ' Laisser le contrôle par défaut du nom d\'utilisateur.'; 22 $lang['UserAdvManager_Password_Enforced'] = 'Renforcement des mots de passe - Activer cette option rend la saisie du mot de passe obligatoire à l\'inscription des visiteurs. De plus, le mot de passe saisi par le visiteur devra répondre à un score de fiabilité.'; 23 $lang['UserAdvManager_Password_Enforced_Info'] = '<b style="text-decoration: underline; color: green;">Explications :</b> <b style="color: green;">Le score d\'un mot de passe est calculé en fonction des paramètres de base : longueur, types de caractères utilisés(lettres, chiffres, majuscules, minuscules, caractères spéciaux). Si le mot de passe de l\'utilisateur ne répond pas au score, le score réalisé est affiché ainsi que le score planchet et une indication pour augmenter la valeur de ce score. Pour donner un ordre d\'idée, un score inférieur à 100 est considéré comme faible. Entre 100 et 500, la fiabilité est renforcée. Au dela de 500, c\'est Fort Knox !! ;-)<br>Vous pouvez tester la fiabilité d\'un mot de passe en utilisant les champs ci-dessous (pour test uniquement !) ;-)</b>'; 24 $lang['UserAdvManager_PasswordTest'] = 'Mot de passe à tester : '; 25 $lang['UserAdvManager_ScoreTest'] = 'Score obtenu : '; 26 $lang['PasswordTest'] = 'Calcul du score'; 27 $lang['UserAdvManager_Password_Enforced_true'] = ' Mot de passe renforcé obligatoire - Saisir le score minimum (planchet)de fiabilité du mots de passe == '; 28 $lang['UserAdvManager_Password_Enforced_false'] = ' Ne pas renforcer les mots de passe (fonctionnement normal)'; 22 29 $lang['UserAdvManager_Confirm_Mail'] = 'Confirmation de l\'adresse email'; 23 30 $lang['UserAdvManager_Confirm_Mail_true'] = ' Envoyer un mail permettant a l\'utilisateur de confirmer son adresse email et donc son compte utilisateur.'; … … 57 64 $lang['UserAdvManager_ConfirmMail_Remail_true'] = 'Activer le rappel par mail'; 58 65 $lang['UserAdvManager_ConfirmMail_Remail_false'] = 'Désactiver le rappel par mail'; 59 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de rappel avec regénération de clé de validation.<br>Si laissé vide, le mail de rappel ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible QUEsi le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>';60 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de rappel sans regénération de clé de validation.<br>Si laissé vide, le mail de rappel sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible QUEsi le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>';66 $lang['UserAdvManager_ConfirmMail_ReMail_Txt1'] = 'Contenu personnalisé du message de rappel avec regénération de clé de validation.<br>Si laissé vide, le mail de rappel ne comportera que le lien de validation. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible <b>QUE</b> si le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>'; 67 $lang['UserAdvManager_ConfirmMail_ReMail_Txt2'] = 'Contenu personnalisé du message de rappel sans regénération de clé de validation.<br>Si laissé vide, le mail de rappel sera vide. Il est donc vivement conseillé de saisir un petit texte explicatif. (NB : Le texte pré renseigné à l\'installation du plugin est donné en exemple)<br><br><b style="color: red;">(!!! </b><b style="text-decoration: underline; color: red;">ATTENTION !</b> <b style="color: red;">La modification du texte n\'est possible <b>QUE</b> si le rappel par email est activé. Utilisez la méthode multi language du plugin Extended Description si celui-ci est activé !!!)</b>'; 61 68 62 69 … … 74 81 - Valider manuellement une inscription en attente de validation même si la date d\'expiration est révolue <b>(forçage de la validation)</b>. 75 82 <br>'; 76 $lang['Registration '] = 'Date d\'enregistrement';83 $lang['Registration_Date'] = 'Date d\'enregistrement'; 77 84 78 85 … … 103 110 $lang['Err_audit_advise'] = '<b>Vous avez des corrections a faire pour respecter les nouvelles règles que vous avez activé<br>utilisez un utilitaire de gestion de base de données pour corriger les comptes utilisateurs directement dans la table ###_USERS si nécessaire.</b>'; 104 111 $lang['UserAdvManager_Empty Author'] = 'Le champs auteur doit être rempli pour enregistrer un commentaire.'; 112 $lang['reg_err_login3'] = 'Mot de passe obligatoire !'; 113 $lang['reg_err_login4'] = 'Le mot de passe choisi est trop faible.'; 105 114 if ( isset($conf_UserAdvManager[1]) and $conf_UserAdvManager[1] == 'true' ) 106 115 $lang['reg_err_login5'] = 'ce nom utilisateur est déjà pris, ATTENTION le nom est insensible à la casse (Majuscule = Minuscule).'; -
extensions/NBC_UserAdvManager/trunk/main.inc.php
r3982 r4061 2 2 /* 3 3 Plugin Name: NBC UserAdvManager 4 Version: 2.11. 44 Version: 2.11.5 5 5 Description: Permet de renforcer les possibilités de gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 … … 67 67 Bug 1179 fixed : Adding a notice in plugin inline documentation for use of validation groups and status. A default group must be set in Piwigo's groups settings and the "Guest" (or another user) must be set as default for status values. 68 68 Bug 1182 fixed : Language tag missing in confirmation email generation 69 70 -- 2.11.5 : Bug 1195 fixed : Registration displays the good title 71 72 -- pre 2.12.0 : Password control and enforcement (step 1) 69 73 70 74 */ … … 157 161 load_language('plugin.lang', NBC_UserAdvManager_PATH); 158 162 global $conf, $template, $page, $lang; 163 164 $PasswordCheck = 0; 159 165 160 166 $conf_nbc_UserAdvManager = isset($conf['nbc_UserAdvManager']) ? explode(";" , $conf['nbc_UserAdvManager']) : array(); … … 163 169 if ( isset($conf_nbc_UserAdvManager[1]) and $conf_nbc_UserAdvManager[1] == 'true' ) 164 170 $lang['reg_err_login5'] = l10n('reg_err_login5'); 165 166 171 167 172 168 /* User identi fication */173 /* User identication */ 169 174 if (script_basename() == 'identification') 170 175 { … … 248 253 249 254 255 if (isset($conf_nbc_UserAdvManager[14]) and $conf_nbc_UserAdvManager[14] == 'true' and !empty($conf_nbc_UserAdvManager[15])) 256 { 257 //$PasswordCheck = testpassword($_POST['password']); 258 $PasswordCheck = 10; 259 if ($PasswordCheck < $conf_nbc_UserAdvManager[15]) 260 { 261 array_push($errors, l10n('reg_err_login4')."'".$conf_nbc_UserAdvManager[15]."'"); 262 //$lang['reg_err_login1'] = l10n('reg_err_login4')."'".$conf_nbc_UserAdvManager[15]."'"; 263 $_POST['password'] = ""; 264 $_POST['password_conf'] = ""; 265 $PasswordCheck = 0; 266 } 267 } 268 250 269 /* Email without forbidden domains */ 251 270 /* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/ … … 348 367 $errors[] = l10n('New password confirmation does not correspond'); 349 368 } 350 369 370 if (isset($conf_nbc_UserAdvManager[14]) and $conf_nbc_UserAdvManager[14] == 'true' and !empty($conf_nbc_UserAdvManager[15])) 371 { 372 //$PasswordCheck = testpassword($_POST['password']); 373 $PasswordCheck = 10; 374 if ($PasswordCheck < $conf_nbc_UserAdvManager[15]) 375 { 376 $lang['reg_err_login1'] = l10n('reg_err_login4')."'".$conf_nbc_UserAdvManager[15]."'"; 377 } 378 } 379 else if (isset($conf_nbc_UserAdvManager[14]) and $conf_nbc_UserAdvManager[14] == 'true') 380 { 381 $lang['reg_err_login1'] = l10n('reg_err_login3'); 382 } 383 351 384 if ( !defined('IN_ADMIN') ) 352 385 {// changing password requires old password -
extensions/NBC_UserAdvManager/trunk/maintain.inc.php
r3881 r4061 12 12 $q = ' 13 13 INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 14 VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;; ","Parametres du plugin nbc UserAdvManager")14 VALUES ("nbc_UserAdvManager","true;false;false;-1;-1;-1;false;false;;-1;;;false;;false;100;","Parametres du plugin nbc UserAdvManager") 15 15 ;'; 16 16 pwg_query($q); … … 58 58 if ($count == 0) 59 59 { 60 upgrade_ UserAdvManager();60 upgrade_210(); 61 61 } 62 62 } … … 90 90 } 91 91 92 function upgrade_ UserAdvManager()92 function upgrade_210() 93 93 { 94 94 global $conf;
Note: See TracChangeset
for help on using the changeset viewer.