1

There is a problem with DNN 9.1. After locking out a user (from code), the DNN cache doesn't refresh.

Scenario

  • User entered his/her password more than Membership.MaxInvalidPasswordAttempts; so, the user is locked out.
  • Logging by 'host' (superuser account), and searching for the locked user, the DNN doesn't display the user as locked. (actually, I was searching for the 'Unlock User' option)

Q

  • Is there any way to let the DNN know after locking a user from the code?
  • How much time, should I wait till the DNN cache refresh?

1 Answers1

2

You can clear the cache programatically in DNN.

DotNetNuke.Common.Utilities.DataCache.ClearModuleCache(TabId);
DotNetNuke.Common.Utilities.DataCache.ClearTabsCache(PortalId);
DotNetNuke.Common.Utilities.DataCache.ClearPortalCache(PortalId, false);

But I doubt this solves your issue since the lockout is not managed by DNN but by ASP.NET Membership. The lockout is real-time. If you go to Admin > User Accounts > Edit User Account you will see that "lockedout = true" on the Manage Account tab. At the bottom is a button to unlock a user.

VDWWD
  • 35,079
  • 22
  • 62
  • 79
  • The lockout is not managed by DNN but by ASP.NET Membership, but the lockout is NOT real-time. I checked it and found [Locked Out: False]. – Ⲁⲅⲅⲉⲗⲟⲥ Jan 29 '19 at 13:18
  • 1
    Yes is is real-time. Just tested it again in 9.2.2. ANd it would not make sense if it weren't. It reads the values from the aspnet membership everytime you open the user properties. – VDWWD Jan 29 '19 at 13:37