dotnetnukedotnetnuke-settings

DotNetNuke "Password Expiry Reminder" does not work


I set the Password Expiry Reminder to 14 or XX days and clicked update. Then I looked at it again it showed default values 7 days. It never update the Password Expiry Reminder (in days) field, Is there bug in DNN.

I tried changing it to a number of days less than 7 and it doesn't set that either.

Could you please let me know what should I do? Please

Thanks and regards Mohsin JK


Solution

  • I just tested this in DotNetNuke 5.6.1. In fact, the setting is updated in the database (check it with:

     SELECT [SettingName]
          ,[SettingValue]
          ,[SettingIsSecure]
          ,[CreatedByUserID]
          ,[CreatedOnDate]
          ,[LastModifiedByUserID]
          ,[LastModifiedOnDate]
      FROM [DNN56].[dbo].[DNN_HostSettings]
      where
      [SettingName] = 'PasswordExpiryReminder'
    

    ) but in fact the web user interface always displays '7', despite the value stored in database.

    Edited:

    I did some further tests and came to realize that reading the value of the property PasswordExpiryReminder of PasswordConfig always returns 7!

    int i = DotNetNuke.Security.Membership.PasswordConfig.PasswordExpiryReminder;
    

    So I turned it into

    int i = DotNetNuke.Entities.Controllers.HostController.Instance.GetInteger("PasswordExpiryReminder");
    

    and this time it returned -1 (because I'm not using the overload supplying a default value).

    Then I had a flash, turned to SSMS and copied the value of the column SettingName and pasted it in Visual Studio.

    int i = DotNetNuke.Entities.Controllers.HostController.Instance.GetInteger("PasswordExpiryReminder ");
    

    Notice the trailing space? And with this code the real number stored in the table is returned. Look someone has a bug.