Changeset 3385 for extensions/NBC_UserAdvManager/main.inc.php
- Timestamp:
- Jun 1, 2009, 10:40:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/main.inc.php
r3352 r3385 2 2 /* 3 3 Plugin Name: NBC UserAdvManager 4 Version: 2.10. 84 Version: 2.10.9 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 … … 29 29 -- 2.10.8 : ConfirmMail page looks better (Sylvia theme only) 30 30 Improved code for checking author on guest comments 31 32 -- 2.10.9 : Bug fixed - Missing english translation 33 Bug fixed - Notice on forbidden characters function use 34 Bug fixed - Audit on forbidden characters in username didn't work 35 Adding of email provider exclusion (like *@hotmail.com) - Warning ! -> Known bug : This feature doesn't work on user profile page. So, already registered users can change their email address to a forbiden one. 31 36 32 37 */ … … 53 58 ++ (...) 54 59 55 -- Password control an senforcement60 -- Password control and enforcement 56 61 -- Empty password (done in Piwigo 2.x) 57 62 ++ Can not be the same as username … … 127 132 function UserAdvManager_InitPage() 128 133 { 134 load_language('plugin.lang', NBC_UserAdvManager_PATH); 129 135 global $conf, $template, $page, $lang; 130 136 … … 172 178 $_POST['login'] = ''; 173 179 } 180 181 /* Email without forbidden domains */ 182 /* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/ 183 //if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email']) and !ValidateEmailProvider($_POST['email'])) 184 //{ 185 // $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 186 // $_POST['login'] = ''; 187 //} 188 /* This work with a code copy of ValidateEmailProvider() function */ 189 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['email'])) 190 { 191 $conf_nbc_MailExclusion = split (",",$conf_nbc_UserAdvManager[13]); 192 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 193 { 194 if (ereg($conf_nbc_MailExclusion[$i], $_POST['email'])) 195 { 196 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 197 $_POST['login'] = ''; 198 } 199 } 200 } 174 201 } 175 202 } … … 194 221 $_POST['login'] = ''; 195 222 } 223 224 225 /* Email without forbidden domains */ 226 /* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/ 227 //if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address']) and !ValidateEmailProvider($_POST['mail_address'])) 228 //{ 229 // $lang['reg_err_mail_address'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 230 // $_POST['mail_address'] = ''; 231 //} 232 /* This work with a code copy of ValidateEmailProvider() function */ 233 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address'])) 234 { 235 $conf_nbc_MailExclusion = split (",",$conf_nbc_UserAdvManager[13]); 236 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 237 { 238 if (ereg($conf_nbc_MailExclusion[$i], $_POST['mail_address'])) 239 { 240 $lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 241 $_POST['login'] = ''; 242 } 243 } 244 } 196 245 } 197 246 } … … 247 296 $errors[] = $mail_error; 248 297 } 249 } 298 /* This don't work on user's profile page - Why ?? */ 299 if (isset($conf_nbc_UserAdvManager[12]) and $conf_nbc_UserAdvManager[12] == 'true' and !empty($_POST['mail_address'])) 300 { 301 $conf_nbc_MailExclusion = split (",",$conf_nbc_UserAdvManager[13]); 302 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 303 { 304 if (ereg($conf_nbc_MailExclusion[$i], $_POST['mail_address'])) 305 { 306 $mail_error = l10n('reg_err_login7')."'".$conf_nbc_UserAdvManager[13]."'"; 307 } 308 } 309 } 310 if (!empty($mail_error)) 311 { 312 $errors[] = $mail_error; 313 } 314 } 315 /* This don't work on call of ValidateEmailProvider() function - Why ?? -> Due to the "return = false|true" in function ?*/ 316 //if (isset($_POST['mail_address'])) 317 //{ 318 // $mail_error = ValidateEmailProvider($_POST['mail_address']); 319 // if (!empty($mail_error)) 320 // { 321 // $errors[] = $mail_error; 322 // } 323 //} 250 324 251 325 $typemail = 3;
Note: See TracChangeset
for help on using the changeset viewer.