Ignore:
Timestamp:
Oct 23, 2013, 6:02:26 PM (11 years ago)
Author:
Eric
Message:

Bug 1109 fixed - Password enforcement features have been removed from UAM and set in a new dedicated plugin : Password Policy

Language files cleanup

Bug 2984 fixed - Display issue in Miscellaneous options
Bug 2986 fixed - Status for unvalidated users can not be "Guest" and is forced to "-------"
Bug 2987 fixed - New registered users have to follow a link on confirmation page before log in

Next release is 2.51.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r24371 r25092  
    3131$replacement = '.';
    3232
    33 $UAM_Password_Test_Score = 0;
    3433$UAM_Exclusionlist_Error = false;
    3534$UAM_Illegal_Flag_Error1 = false;
     
    110109  case 'global':
    111110
    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']))
    113112  {
    114113
     
    234233    $newconf_UAM['MAILEXCLUSION'] = (isset($_POST['UAM_MailExclusion']) ? $_POST['UAM_MailExclusion'] : 'false');
    235234    $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');
    239235    $newconf_UAM['GHOSTRACKER'] = (isset($_POST['UAM_GhostUser_Tracker']) ? $_POST['UAM_GhostUser_Tracker'] : 'false');
    240236    $newconf_UAM['GHOSTRACKER_DAYLIMIT'] = (isset($_POST['UAM_GhostTracker_DayLimit']) ? $_POST['UAM_GhostTracker_DayLimit'] : '10');
     
    260256    $newconf_UAM['VALID_LEVEL'] = (isset($_POST['UAM_Valid_Level']) ? $_POST['UAM_Valid_Level'] : '');
    261257    $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');
    263258    $newconf_UAM['REJECTCONNECT'] = (isset($_POST['UAM_RejectConnexion']) ? $_POST['UAM_RejectConnexion'] : 'false');
    264259    $newconf_UAM['REJECTCONNECT_TEXT'] = (isset($_POST['UAM_CustomRejectConnexion_Text']) ? $_POST['UAM_CustomRejectConnexion_Text'] : l10n('UAM_Default_RejectConnexion_Txt'));
     
    359354      array_push($page['errors'], l10n('UAM_No_Backup_File'));
    360355    }
    361   }
    362 
    363   // Testing password enforcement
    364   // ----------------------------
    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'));
    372356  }
    373357
     
    447431  $Valid_Status = -1;
    448432  $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
    450445  // Get unvalidate status values
    451446  // ----------------------------
    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 status
    461     // ----------------------------------------------------
    462     $template->assign(
    463       'No_Confirm_Status',
    464         array(
    465           'Status_options' => $status_options,
    466           'Status_selected' => $No_Valid_Status
    467         )
    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
    471466  // Get validate status values
    472467  // --------------------------
     
    490485  }
    491486
     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
    492499  // Get downgrade status values
    493500  // ---------------------------
    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 status
    503     // --------------------------------------------------
    504     $template->assign(
    505       'Downgrade_Status',
    506         array(
    507           'Status_options' => $status_options,
    508           'Status_selected' => $Downgrade_Status
    509         )
    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//  }
    512519
    513520
     
    627634                                                'UAM_MAILEXCLUSION_FALSE'           => $conf_UAM['MAILEXCLUSION']=='false' ? 'checked="checked"' : '' ,
    628635                                                '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"' : '' ,
    634636            'UAM_GHOSTRACKER_TRUE'              => $conf_UAM['GHOSTRACKER']=='true' ? 'checked="checked"' : '' ,
    635637                                                'UAM_GHOSTRACKER_FALSE'             => $conf_UAM['GHOSTRACKER']=='false' ? 'checked="checked"' : '' ,
     
    666668                                                'UAM_VALID_LEVEL'                   => $conf_UAM['VALID_LEVEL'],
    667669            '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"' : '' ,
    670670            'UAM_REJECTCONNECT_TRUE'            => $conf_UAM['REJECTCONNECT']=='true' ? 'checked="checked"' : '' ,
    671671            'UAM_REJECTCONNECT_FALSE'           => $conf_UAM['REJECTCONNECT']=='false' ? 'checked="checked"' : '' ,
     
    679679            'UAM_ADDURL2MAIL_TRUE'              => $conf_UAM['ADD_GALLERY_URL_TO_EMAILS']=='true' ? 'checked="checked"' : '' ,
    680680            'UAM_ADDURL2MAIL_FALSE'             => $conf_UAM['ADD_GALLERY_URL_TO_EMAILS']=='false' ? 'checked="checked"' : '' ,
    681                                                 'UAM_PASSWORD_TEST_SCORE'           => $UAM_Password_Test_Score,
    682681            'UAM_ERROR_REPORTS1'                => $UAM_Exclusionlist_Error,
    683682            'UAM_ERROR_REPORTS2'                => $UAM_Illegal_Flag_Error1,
Note: See TracChangeset for help on using the changeset viewer.