Developer forum

Forum » Development » Force user cache update

Force user cache update

Lars Larsen
Lars Larsen
Reply

Hi

I have some customcode that saves a user using the API (Dynamicweb.Security.Management.User.Save()). But when editing the user using the Extranet App (Edit profile option) the change saved using the API is not reflected in the APP. Could it be a user information cache that is not updated when Dynamicweb.Security.Management.User.Save() is called? If so, how can I force an update of that cache?

Running DW v9.6.9


Replies

 
Lars Larsen
Lars Larsen
Reply

Bump...

 
Nicolai Pedersen
Reply
This post has been marked as an answer

If the user is already logged in, the user is stored in session, and that is used for edit profile. So you need to reset the session of that user - you cannot do that in a request that is not that user. You have to remove all session variables that starts with "UserManagement.User.Current"

I have just changed the feature to always load the user from database when editing the user.

Votes for this answer: 1

 

You must be logged in to post in the forum