Changeset 25092 for extensions/UserAdvManager/trunk/admin/UAM_admin.php
- Timestamp:
- Oct 23, 2013, 6:02:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserAdvManager/trunk/admin/UAM_admin.php
r24371 r25092 31 31 $replacement = '.'; 32 32 33 $UAM_Password_Test_Score = 0;34 33 $UAM_Exclusionlist_Error = false; 35 34 $UAM_Illegal_Flag_Error1 = false; … … 110 109 case 'global': 111 110 112 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_ Password_Enforced']) and isset($_POST['UAM_AdminPassword_Enforced']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_PwdReset']) and isset($_POST['UAM_RejectConnexion']) and isset($_POST['UAM_AddURL2Mail']))111 if (isset($_POST['submit']) and isset($_POST['UAM_Mail_Info']) and isset($_POST['UAM_Username_Char']) and isset($_POST['UAM_Confirm_Mail']) and isset($_POST['UAM_GhostUser_Tracker']) and isset($_POST['UAM_Admin_ConfMail']) and isset($_POST['UAM_RedirToProfile']) and isset($_POST['UAM_GTAuto']) and isset($_POST['UAM_GTAutoMail']) and isset($_POST['UAM_CustomPasswRetr']) and isset($_POST['UAM_USRAuto']) and isset($_POST['UAM_USRAutoMail']) and isset($_POST['UAM_Stuffs']) and isset($_POST['UAM_HidePassw']) and isset($_POST['UAM_RejectConnexion']) and isset($_POST['UAM_AddURL2Mail'])) 113 112 { 114 113 … … 234 233 $newconf_UAM['MAILEXCLUSION'] = (isset($_POST['UAM_MailExclusion']) ? $_POST['UAM_MailExclusion'] : 'false'); 235 234 $newconf_UAM['MAILEXCLUSION_LIST'] = (isset($_POST['UAM_MailExclusion_List']) ? $_POST['UAM_MailExclusion_List'] : ''); 236 $newconf_UAM['PASSWORDENF'] = (isset($_POST['UAM_Password_Enforced']) ? $_POST['UAM_Password_Enforced'] : 'false');237 $newconf_UAM['PASSWORD_SCORE'] = (isset($_POST['UAM_Password_Score']) ? $_POST['UAM_Password_Score'] : '100');238 $newconf_UAM['ADMINPASSWENF'] = (isset($_POST['UAM_AdminPassword_Enforced']) ? $_POST['UAM_AdminPassword_Enforced'] : 'false');239 235 $newconf_UAM['GHOSTRACKER'] = (isset($_POST['UAM_GhostUser_Tracker']) ? $_POST['UAM_GhostUser_Tracker'] : 'false'); 240 236 $newconf_UAM['GHOSTRACKER_DAYLIMIT'] = (isset($_POST['UAM_GhostTracker_DayLimit']) ? $_POST['UAM_GhostTracker_DayLimit'] : '10'); … … 260 256 $newconf_UAM['VALID_LEVEL'] = (isset($_POST['UAM_Valid_Level']) ? $_POST['UAM_Valid_Level'] : ''); 261 257 $newconf_UAM['DOWNGRADE_LEVEL'] = (isset($_POST['UAM_Downgrade_Level']) ? $_POST['UAM_Downgrade_Level'] : ''); 262 $newconf_UAM['PWDRESET'] = (isset($_POST['UAM_PwdReset']) ? $_POST['UAM_PwdReset'] : 'false');263 258 $newconf_UAM['REJECTCONNECT'] = (isset($_POST['UAM_RejectConnexion']) ? $_POST['UAM_RejectConnexion'] : 'false'); 264 259 $newconf_UAM['REJECTCONNECT_TEXT'] = (isset($_POST['UAM_CustomRejectConnexion_Text']) ? $_POST['UAM_CustomRejectConnexion_Text'] : l10n('UAM_Default_RejectConnexion_Txt')); … … 359 354 array_push($page['errors'], l10n('UAM_No_Backup_File')); 360 355 } 361 }362 363 // Testing password enforcement364 // ----------------------------365 if (isset($_POST['PasswordTest']) and isset($_POST['UAM_Password_Test']) and !empty($_POST['UAM_Password_Test']))366 {367 $UAM_Password_Test_Score = testpassword($_POST['UAM_Password_Test']);368 }369 else if (isset($_POST['PasswordTest']) and empty($_POST['UAM_Password_Test']))370 {371 array_push($page['errors'], l10n('UAM_reg_err_login3'));372 356 } 373 357 … … 447 431 $Valid_Status = -1; 448 432 $Downgrade_Status = -1; 449 433 434 // Bug fix - We can not use "Guest" status and other are not suitable so we fix NO_CONFIRM_STATUS to "------------" 435 $conf_UAM['NO_CONFIRM_STATUS'] == $status_options[-1]; 436 437 $template->assign( 438 'No_Confirm_Status', 439 array( 440 'Status_options' => $status_options[-1], 441 'Status_selected' => $status_options[-1] 442 ) 443 ); 444 450 445 // Get unvalidate status values 451 446 // ---------------------------- 452 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)453 {454 $status_options[$status] = l10n('user_status_'.$status);455 if (isset($conf_UAM['NO_CONFIRM_STATUS']) and $conf_UAM['NO_CONFIRM_STATUS'] == $status)456 {457 $No_Valid_Status = $status;458 }459 460 // Template initialization for unvalidated users status461 // ----------------------------------------------------462 $template->assign(463 'No_Confirm_Status',464 array(465 'Status_options' => $status_options,466 'Status_selected' => $No_Valid_Status467 )468 );469 }470 447 // foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 448 // { 449 // $status_options[$status] = l10n('user_status_'.$status); 450 // if (isset($conf_UAM['NO_CONFIRM_STATUS']) and $conf_UAM['NO_CONFIRM_STATUS'] == $status) 451 // { 452 // $No_Valid_Status = $status; 453 // } 454 // 455 // // Template initialization for unvalidated users status 456 // // ---------------------------------------------------- 457 // $template->assign( 458 // 'No_Confirm_Status', 459 // array( 460 // 'Status_options' => $status_options, 461 // 'Status_selected' => $No_Valid_Status 462 // ) 463 // ); 464 // } 465 471 466 // Get validate status values 472 467 // -------------------------- … … 490 485 } 491 486 487 488 // Bug fix - We can not use "Guest" status and other are not suitable so we fix DOWNGRADE_STATUS to "------------" 489 $conf_UAM['DOWNGRADE_STATUS'] == $status_options[-1]; 490 491 $template->assign( 492 'Downgrade_Status', 493 array( 494 'Status_options' => $status_options[-1], 495 'Status_selected' => $status_options[-1] 496 ) 497 ); 498 492 499 // Get downgrade status values 493 500 // --------------------------- 494 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)495 {496 $status_options[$status] = l10n('user_status_'.$status);497 if (isset($conf_UAM['DOWNGRADE_STATUS']) and $conf_UAM['DOWNGRADE_STATUS'] == $status)498 {499 $Downgrade_Status = $status;500 }501 502 // Template initialization for validated users status503 // --------------------------------------------------504 $template->assign(505 'Downgrade_Status',506 array(507 'Status_options' => $status_options,508 'Status_selected' => $Downgrade_Status509 )510 );511 }501 // foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) 502 // { 503 // $status_options[$status] = l10n('user_status_'.$status); 504 // if (isset($conf_UAM['DOWNGRADE_STATUS']) and $conf_UAM['DOWNGRADE_STATUS'] == $status) 505 // { 506 // $Downgrade_Status = $status; 507 // } 508 // 509 // // Template initialization for validated users status 510 // // -------------------------------------------------- 511 // $template->assign( 512 // 'Downgrade_Status', 513 // array( 514 // 'Status_options' => $status_options, 515 // 'Status_selected' => $Downgrade_Status 516 // ) 517 // ); 518 // } 512 519 513 520 … … 627 634 'UAM_MAILEXCLUSION_FALSE' => $conf_UAM['MAILEXCLUSION']=='false' ? 'checked="checked"' : '' , 628 635 'UAM_MAILEXCLUSION_LIST' => $conf_UAM['MAILEXCLUSION_LIST'], 629 'UAM_PASSWORDENF_TRUE' => $conf_UAM['PASSWORDENF']=='true' ? 'checked="checked"' : '' ,630 'UAM_PASSWORDENF_FALSE' => $conf_UAM['PASSWORDENF']=='false' ? 'checked="checked"' : '' ,631 'UAM_PASSWORD_SCORE' => $conf_UAM['PASSWORD_SCORE'],632 'UAM_ADMINPASSWENF_TRUE' => $conf_UAM['ADMINPASSWENF']=='true' ? 'checked="checked"' : '' ,633 'UAM_ADMINPASSWENF_FALSE' => $conf_UAM['ADMINPASSWENF']=='false' ? 'checked="checked"' : '' ,634 636 'UAM_GHOSTRACKER_TRUE' => $conf_UAM['GHOSTRACKER']=='true' ? 'checked="checked"' : '' , 635 637 'UAM_GHOSTRACKER_FALSE' => $conf_UAM['GHOSTRACKER']=='false' ? 'checked="checked"' : '' , … … 666 668 'UAM_VALID_LEVEL' => $conf_UAM['VALID_LEVEL'], 667 669 'UAM_DOWNGRADE_LEVEL' => $conf_UAM['DOWNGRADE_LEVEL'], 668 'UAM_PWDRESET_TRUE' => $conf_UAM['PWDRESET']=='true' ? 'checked="checked"' : '' ,669 'UAM_PWDRESET_FALSE' => $conf_UAM['PWDRESET']=='false' ? 'checked="checked"' : '' ,670 670 'UAM_REJECTCONNECT_TRUE' => $conf_UAM['REJECTCONNECT']=='true' ? 'checked="checked"' : '' , 671 671 'UAM_REJECTCONNECT_FALSE' => $conf_UAM['REJECTCONNECT']=='false' ? 'checked="checked"' : '' , … … 679 679 'UAM_ADDURL2MAIL_TRUE' => $conf_UAM['ADD_GALLERY_URL_TO_EMAILS']=='true' ? 'checked="checked"' : '' , 680 680 'UAM_ADDURL2MAIL_FALSE' => $conf_UAM['ADD_GALLERY_URL_TO_EMAILS']=='false' ? 'checked="checked"' : '' , 681 'UAM_PASSWORD_TEST_SCORE' => $UAM_Password_Test_Score,682 681 'UAM_ERROR_REPORTS1' => $UAM_Exclusionlist_Error, 683 682 'UAM_ERROR_REPORTS2' => $UAM_Illegal_Flag_Error1,
Note: See TracChangeset
for help on using the changeset viewer.