Changeset 8041 for extensions/NBC_UserAdvManager/branches/2.15
- Timestamp:
- Dec 8, 2010, 9:36:30 PM (13 years ago)
- 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 202 202 Bug 1936 fixed - Bad home link in ConfirmMail page when gallery URL is not set 203 203 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 204 208 */ 205 209 ?> -
extensions/NBC_UserAdvManager/branches/2.15/language/it_IT/plugin.lang.php
r6776 r8041 20 20 $lang['title_confirm_mail'] = 'Confermare la vostra iscrizzione'; 21 21 $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>';23 22 24 23 … … 103 102 /* UserList Tab */ 104 103 $lang['UserList_Title'] = 'Monitoraggio degli utenti registrati'; 104 $lang['Tab_UserList'] = 'Monitoraggio degli utenti'; 105 105 // --------- End: New or revised $lang ---- from version 2.13.0 106 106 … … 142 142 $lang['UAM_Confirm_Mail_false'] = ' Disattivare (di default)'; 143 143 $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.';145 144 $lang['UAM_Confirm_Group'] = 'Gruppi di convalida<br>(------- per non assegnare nessun gruppo)'; 146 145 $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.'; 147 147 $lang['UAM_No_Confirm_Group'] = 'Gruppo per gli utenti che non hanno convalidato la loro iscrizione<br>'; 148 148 $lang['UAM_Validated_Group'] = 'Gruppo per gli utenti che hanno convalidato la loro iscrizione<br>'; … … 183 183 /* UserList Tab */ 184 184 $lang['SubTitle5'] = 'Infos sugli utenti'; 185 $lang['Tab_UserList'] = 'Monitoraggio degli utenti';186 185 /* Mailing */ 187 186 $lang['Add of %s'] = 'Profilo creato per %s'; 188 187 $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>';191 188 /* Mailing */ 192 189 $lang['Ghost_reminder_of_%s'] = '%s, questa è un\'Email di rilancio'; … … 264 261 265 262 // --------- 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'; 270 267 $lang['UAM_RedirToProfile_false'] = ' Disattivare (di default)'; 271 268 $lang['UAM_RedirToProfile_true'] = ' Attivare'; -
extensions/NBC_UserAdvManager/branches/2.15/main.inc.php
r7657 r8041 2 2 /* 3 3 Plugin Name: UserAdvManager 4 Version: 2.15. 94 Version: 2.15.10 5 5 Description: Renforcer la gestion des utilisateurs - Enforce users management 6 6 Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 … … 168 168 add_event_handler('register_user_check', 'UAM_RegistrationCheck', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 169 169 170 function UAM_RegistrationCheck($err , $user)171 { 172 global $ errors, $conf;170 function UAM_RegistrationCheck($errors, $user) 171 { 172 global $conf; 173 173 174 174 // Exclusion of Adult_Content users 175 175 if ($user['username'] != "16" and $user['username'] != "18") 176 176 { 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 256 179 $PasswordCheck = 0; 257 180 … … 268 191 { 269 192 $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']); 271 195 } 272 196 } … … 278 202 { 279 203 $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']); 281 206 } 282 207 } … … 284 209 285 210 // 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']); 290 215 } 291 216 292 217 // 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; 298 224 } 299 225 }
Note: See TracChangeset
for help on using the changeset viewer.