Changeset 6354 for extensions/NBC_UserAdvManager/trunk/main.inc.php
- Timestamp:
- May 25, 2010, 6:11:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/NBC_UserAdvManager/trunk/main.inc.php
r6255 r6354 80 80 if (!is_admin() and !is_a_guest()) 81 81 { 82 if ((isset($conf_UAM[1 7]) and $conf_UAM[17] == 'true') or (isset($conf_UAM[20]) and $conf_UAM[20] == 'true'))82 if ((isset($conf_UAM[16]) and $conf_UAM[16] == 'true') or (isset($conf_UAM[19]) and $conf_UAM[19] == 'true')) 83 83 { 84 84 … … 129 129 130 130 /* Sending registration confirmation by email */ 131 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[ 2]) and $conf_UAM[2] == 'true'))132 { 133 if (is_admin() and isset($conf_UAM[2 1]) and $conf_UAM[21] == 'true')131 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 132 { 133 if (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'true') 134 134 { 135 135 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; 136 136 SendMail2User(1, $register_user['id'], $register_user['username'], $passwd, $register_user['email'], true); 137 137 } 138 elseif (is_admin() and isset($conf_UAM[2 1]) and $conf_UAM[21] == 'false')138 elseif (is_admin() and isset($conf_UAM[20]) and $conf_UAM[20] == 'false') 139 139 { 140 140 $passwd = (isset($_POST['password'])) ? $_POST['password'] : ''; … … 253 253 254 254 /* Password enforcement control */ 255 if (isset($conf_UAM[1 4]) and $conf_UAM[14] == 'true' and !empty($conf_UAM[15]))255 if (isset($conf_UAM[13]) and $conf_UAM[13] == 'true' and !empty($conf_UAM[14])) 256 256 { 257 257 if (!empty($user['password']) and !is_admin()) … … 259 259 $PasswordCheck = testpassword($user['password']); 260 260 261 if ($PasswordCheck < $conf_UAM[1 5])261 if ($PasswordCheck < $conf_UAM[14]) 262 262 { 263 263 $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck); 264 return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[1 5]);265 } 266 } 267 else if (!empty($user['password']) and is_admin() and isset($conf_UAM[1 6]) and $conf_UAM[16] == 'true')264 return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]); 265 } 266 } 267 else if (!empty($user['password']) and is_admin() and isset($conf_UAM[15]) and $conf_UAM[15] == 'true') 268 268 { 269 269 $PasswordCheck = testpassword($user['password']); 270 270 271 if ($PasswordCheck < $conf_UAM[1 5])271 if ($PasswordCheck < $conf_UAM[14]) 272 272 { 273 273 $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck); 274 return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[15]); 275 } 276 } 277 } 278 279 /* Username non case sensitive */ 280 if (isset($conf_UAM[1]) and $conf_UAM[1] == 'true' and NotSensibleSearchUsername($_POST['login'])) 281 { 282 return($lang['reg_err_login5'] = l10n('reg_err_login5')); 274 return($lang['reg_err_pass'] = l10n_args($message).$conf_UAM[14]); 275 } 276 } 283 277 } 284 278 285 279 /* Username without forbidden keys */ 286 if (isset($conf_UAM[ 7]) and $conf_UAM[7] == 'true' and !empty($_POST['login']) and ValidateUsername($_POST['login']) and !is_admin())280 if (isset($conf_UAM[6]) and $conf_UAM[6] == 'true' and !empty($_POST['login']) and ValidateUsername($_POST['login']) and !is_admin()) 287 281 { 288 282 $_POST['login'] = ''; 289 return($lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_UAM[ 8]."'");283 return($lang['reg_err_login1'] = l10n('reg_err_login6')."'".$conf_UAM[7]."'"); 290 284 } 291 285 292 286 /* Email without forbidden domains */ 293 if (isset($conf_UAM[1 2]) and $conf_UAM[12] == 'true' and !empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']) and !is_admin())287 if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['mail_address']) and ValidateEmailProvider($_POST['mail_address']) and !is_admin()) 294 288 { 295 289 $_POST['mail_address'] = ''; 296 return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_UAM[1 3]."'");290 return($lang['reg_err_login1'] = l10n('reg_err_login7')."'".$conf_UAM[12]."'"); 297 291 } 298 292 } … … 312 306 { 313 307 /* Email without forbidden domains */ 314 if (isset($conf_UAM[1 2]) and $conf_UAM[12] == 'true' and !empty($_POST['mail_address']))308 if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['mail_address'])) 315 309 { 316 310 if (ValidateEmailProvider($_POST['mail_address'])) 317 311 { 318 $template->append('errors', l10n('reg_err_login7')."'".$conf_UAM[1 3]."'");312 $template->append('errors', l10n('reg_err_login7')."'".$conf_UAM[12]."'"); 319 313 unset($_POST['validate']); 320 314 } … … 328 322 329 323 /* Password enforcement control */ 330 if (isset($conf_UAM[1 4]) and $conf_UAM[14] == 'true' and !empty($conf_UAM[15]))324 if (isset($conf_UAM[13]) and $conf_UAM[13] == 'true' and !empty($conf_UAM[14])) 331 325 { 332 326 $PasswordCheck = testpassword($_POST['use_new_pwd']); 333 327 334 if ($PasswordCheck < $conf_UAM[1 5])328 if ($PasswordCheck < $conf_UAM[14]) 335 329 { 336 330 $message = get_l10n_args('reg_err_login4_%s', $PasswordCheck); 337 $template->append('errors', l10n_args($message).$conf_UAM[1 5]);331 $template->append('errors', l10n_args($message).$conf_UAM[14]); 338 332 unset($_POST['use_new_pwd']); 339 333 unset($_POST['validate']); … … 343 337 344 338 /* Sending registration confirmation by email */ 345 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[ 2]) and $conf_UAM[2] == 'true'))339 if ((isset($conf_UAM[0]) and $conf_UAM[0] == 'true') or (isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 346 340 { 347 341 $confirm_mail_need = false; … … 357 351 list($current_email) = pwg_db_fetch_row(pwg_query($query)); 358 352 359 if ($_POST['mail_address'] != $current_email and ( isset($conf_UAM[ 2]) and $conf_UAM[2] == 'true'))353 if ($_POST['mail_address'] != $current_email and ( isset($conf_UAM[1]) and $conf_UAM[1] == 'true')) 360 354 361 355 $confirm_mail_need = true; … … 395 389 { 396 390 /* Email without forbidden domains */ 397 if (isset($conf_UAM[1 2]) and $conf_UAM[12] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email']))398 { 399 $template->append('errors', l10n('reg_err_login7')."'".$conf_UAM[1 3]."'");391 if (isset($conf_UAM[11]) and $conf_UAM[11] == 'true' and !empty($_POST['email']) and ValidateEmailProvider($_POST['email'])) 392 { 393 $template->append('errors', l10n('reg_err_login7')."'".$conf_UAM[12]."'"); 400 394 unset($_POST['submit_add']); 401 395 } … … 415 409 416 410 /* User creation OR update */ 417 if (isset($conf_UAM[ 6]) and $conf_UAM[6] == 'true' and $conf['comments_forall'] == 'true' and $comm['author'] == 'guest')411 if (isset($conf_UAM[5]) and $conf_UAM[5] == 'true' and $conf['comments_forall'] == 'true' and $comm['author'] == 'guest') 418 412 { 419 413 $comment_action = 'reject';
Note: See TracChangeset
for help on using the changeset viewer.