Ignore:
Timestamp:
Dec 8, 2010, 9:36:30 PM (13 years ago)
Author:
Eric
Message:

bug 2050 fixed : Compatibility with Captcha
IT translation improved (thx to Rio)
New version 2.15.10 hard coded

Location:
extensions/NBC_UserAdvManager/branches/2.15
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/branches/2.15/changelog.txt.php

    r7278 r8041  
    202202            Bug 1936 fixed - Bad home link in ConfirmMail page when gallery URL is not set
    203203            small CSS improvement (thx to Gotcha)
     204
     205-- 2.15.9 : Bug 2010 fixed - No confirmation email when information email is not set
     206
     207-- 2.15.10 : Bug 2050 fixed - Compatibility with Captcha
    204208*/
    205209?>
  • extensions/NBC_UserAdvManager/branches/2.15/language/it_IT/plugin.lang.php

    r6776 r8041  
    2020$lang['title_confirm_mail'] = 'Confermare la vostra iscrizzione';
    2121$lang['confirm_mail_page_title'] = 'Confermare l\'iscrizzione';
    22 $lang['confirm_mail_ok'] = '<br><br><br>Grazie per aver confermato il vostro indirizzo Email e per l\'iscrizione sulla galleria. Buona visione!<br><br><br><br>';
    2322
    2423
     
    103102/* UserList Tab */
    104103$lang['UserList_Title'] = 'Monitoraggio degli utenti registrati';
     104$lang['Tab_UserList'] = 'Monitoraggio degli utenti';
    105105// --------- End: New or revised $lang ---- from version 2.13.0
    106106
     
    142142$lang['UAM_Confirm_Mail_false'] = ' Disattivare (di default)';
    143143$lang['UAM_ConfirmMail_Text'] = ' Personalizzare il testo dell\'Email di conferma:';
    144 $lang['UAM_Confirm_grpstat_notice'] = 'ATTENZIONE: Si consiglia di utilizzare o il gruppo o lo statuto di convalida ma non entrambi simultaneamente.';
    145144$lang['UAM_Confirm_Group'] = 'Gruppi di convalida<br>(------- per non assegnare nessun gruppo)';
    146145$lang['UAM_Confirm_Status'] = 'Convalida Statuti<br>(Invia ------- per mantenere il valore di default di Piwigo)';
     146$lang['UAM_Confirm_grpstat_notice'] = 'ATTENZIONE: Si consiglia di utilizzare o il gruppo o lo statuto di convalida ma non entrambi simultaneamente.';
    147147$lang['UAM_No_Confirm_Group'] = 'Gruppo per gli utenti che non hanno convalidato la loro iscrizione<br>';
    148148$lang['UAM_Validated_Group'] = 'Gruppo per gli utenti che hanno convalidato la loro iscrizione<br>';
     
    183183/* UserList Tab */
    184184$lang['SubTitle5'] = 'Infos sugli utenti';
    185 $lang['Tab_UserList'] = 'Monitoraggio degli utenti';
    186185/* Mailing */
    187186$lang['Add of %s'] = 'Profilo creato per %s';
    188187$lang['Update of %s'] = 'Profilo %s aggiornato';
    189 /* Email confirmation page */
    190 $lang['confirm_mail_bad'] = '<br><br><br>La vostra chiave di attivazione non è corretta o è scaduta o è già stata usata per convalidare il vostro account. Si prega di contattare il webmaster per risolvere questo problema.<br><br><br><br>';
    191188/* Mailing */
    192189$lang['Ghost_reminder_of_%s'] = '%s, questa è un\'Email di rilancio';
     
    264261
    265262// --------- Starting below: New or revised $lang ---- from version 2.15.4
    266 /*TODO*/$lang['Force_Validation'] = 'Manual validation';
    267 /*TODO*/$lang['UAM_Confirm_Mail_true'] = ' Enable - Validation by user';
    268 /*TODO*/$lang['UAM_Confirm_Mail_local'] = ' Enable - Validation by admin (no validation key sent)';
    269 /*TODO*/$lang['UAM_RedirToProfile'] = 'Redirect to "Customization" page';
     263$lang['Force_Validation'] = 'Validazione manuale';
     264$lang['UAM_Confirm_Mail_true'] = ' Attivare - Validazione dal utente';
     265$lang['UAM_Confirm_Mail_local'] = ' Attivare - Validazione dal amministratore (nessuna chiave di validazione inviata)';
     266$lang['UAM_RedirToProfile'] = 'Ridirezione verso la pagina di personalizzazione';
    270267$lang['UAM_RedirToProfile_false'] = ' Disattivare (di default)';
    271268$lang['UAM_RedirToProfile_true'] = ' Attivare';
  • extensions/NBC_UserAdvManager/branches/2.15/main.inc.php

    r7657 r8041  
    22/*
    33Plugin Name: UserAdvManager
    4 Version: 2.15.9
     4Version: 2.15.10
    55Description: Renforcer la gestion des utilisateurs - Enforce users management
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216
     
    168168add_event_handler('register_user_check', 'UAM_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
    169169
    170 function UAM_RegistrationCheck($err, $user)
    171 {
    172   global $errors, $conf;
     170function UAM_RegistrationCheck($errors, $user)
     171{
     172  global $conf;
    173173
    174174  // Exclusion of Adult_Content users
    175175  if ($user['username'] != "16" and $user['username'] != "18")
    176176  {
    177 // ***********************************************************
    178 // We need to reset the standard Piwigo's register controls   
    179 // because the call of register_user_check trigger resets them
    180 // ***********************************************************
    181   // **********************************
    182   // Standard Piwigo's username control
    183   // **********************************
    184     if ($_POST['login'] == '')
    185     {
    186       return l10n('reg_err_login1');
    187     }
    188     if (preg_match('/^.* $/', $_POST['login']))
    189     {
    190       return l10n('reg_err_login2');
    191     }
    192     if (preg_match('/^ .*$/', $_POST['login']))
    193     {
    194       return l10n('reg_err_login3');
    195     }
    196     if (get_userid($_POST['login']))
    197     {
    198       return l10n('reg_err_login5');
    199     }
    200  
    201     if (script_basename() == 'admin' and isset($_GET['page']) and $_GET['page'] == 'user_list') // not the same email variable if we are on users registration page or on admin's user registration page
    202     {
    203     // Email doblons check
    204       $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
    205       $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
    206       $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
    207  
    208       if (!preg_match($regex, $_POST['email']))
    209       {
    210         return l10n('reg_err_mail_address');
    211       }
    212    
    213       $query = '
    214 SELECT count(*)
    215 FROM '.USERS_TABLE.'
    216 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['email'].'\')
    217 ;';
    218       list($count) = pwg_db_fetch_row(pwg_query($query));
    219       if ($count != 0)
    220       {
    221         return l10n('reg_err_mail_address_dbl');
    222       }
    223     }
    224 
    225     if (script_basename() == 'register') // not the same email variable if we are on users registration page or on admin's user registration page
    226     {
    227   // Email doblons check
    228       $atom   = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]';   // before  arobase
    229       $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // domain name
    230       $regex = '/^' . $atom . '+' . '(\.' . $atom . '+)*' . '@' . '(' . $domain . '{1,63}\.)+' . $domain . '{2,63}$/i';
    231  
    232       if (!preg_match($regex, $_POST['mail_address']))
    233       {
    234         return l10n('reg_err_mail_address');
    235       }
    236    
    237       $query = '
    238 SELECT count(*)
    239 FROM '.USERS_TABLE.'
    240 WHERE upper('.$conf['user_fields']['email'].') = upper(\''.$_POST['mail_address'].'\')
    241 ;';
    242       list($count) = pwg_db_fetch_row(pwg_query($query));
    243       if ($count != 0)
    244       {
    245         return l10n('reg_err_mail_address_dbl');
    246       }
    247     }
    248 // ******************************************
    249 // End of Piwigo's standard register controls
    250 // ******************************************
    251 
    252 
    253 // ******************************************
    254 // Here begins the advanced register controls
    255 // ******************************************
     177    load_language('plugin.lang', UAM_PATH);
     178
    256179    $PasswordCheck = 0;
    257180
     
    268191        {
    269192          $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck);
    270           return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]);
     193          $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14];
     194          array_push($errors, $lang['reg_err_pass']);
    271195        }
    272196      }
     
    278202        {
    279203          $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck);
    280           return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]);
     204          $lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14];
     205          array_push($errors, $lang['reg_err_pass']);
    281206        }
    282207      }
     
    284209
    285210    // Username without forbidden keys
    286     if (isset($conf_UAM[6]) and $conf_UAM[6] == 'true' and !empty($_POST['login']) and ValidateUsername($_POST['login']) and !is_admin())
    287     {
    288       $_POST['login'] = '';
    289       return($lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_UAM[7]."'");
     211    if (isset($conf_UAM[6]) and $conf_UAM[6] == 'true' and !empty($user['username']) and ValidateUsername($user['username']) and !is_admin())
     212    {
     213      $lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_UAM[7]."'";
     214      array_push($errors, $lang['reg_err_login1']);
    290215    }
    291216
    292217    // Email without forbidden domains
    293     if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']) and !is_admin())
    294     {
    295       $_POST['mail_address'] = '';
    296       return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_UAM[12]."'");
    297     }
     218    if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($user['email']) and ValidateEmailProvider($user['email']) and !is_admin())
     219    {
     220      $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_UAM[12]."'";
     221      array_push($errors, $lang['reg_err_login1']);
     222    }
     223    return $errors;
    298224  }
    299225}
Note: See TracChangeset for help on using the changeset viewer.