reset views for all users?

Vote:
 

Hi

Is there an easy way to mass reset all the user account views rather than asking all the users to login > my account > display options > reset views

Thanks

#89291
Aug 12, 2014 17:05
Vote:
 

Hello Douglas

The view settings are saved in cookies, so you would have to delete these cookies on mass from each user's machine. The following article may be useful:

http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2013/1/Resetting-your-EPiServer-views/

David

#89293
Aug 12, 2014 17:42
Vote:
 

Hi David

Thank you for the reply. My browser empties its cookies each time I close it and the user accounts I'm logging into I've never logged into before as I can still see they have a certain gadget added to their interface layout so this sounds like its stored in the DB somewhere?

Would be good to be able to wipe all the user settings in one fell swoop as we currently have 72 accounts.

Doug

#89294
Edited, Aug 12, 2014 18:30
Vote:
 

Good point Doug, I can see from Linus' code that some settings are actually ultimately saved in the database via the IPersonalizedViewSettingsRepository implementation. You could excute some code that interated each user and called the repository.Delete(User, setting.ViewName); method that would essentially mimic each user logging in and hitting the delete button. The psuedo code to do this would look something like this:

foreach (string username in AListOfAllUserNames)
{
    IPersonalizedViewSettingsRepository instance = ServiceLocator.Current.GetInstance();
    IPrincipal principal = PrincipalInfo.CreatePrincipal(username);
    foreach (PersonalizedViewSettings settings in instance.Load(principal))
    {
        instance.Delete(principal, settings.ViewName);
    }
}
#89295
Edited, Aug 12, 2014 18:57
Vote:
 

Hi,

The nuke option is something like this, run in context of your cms database:

delete from [dbo].[tblBigTable]

 where StoreName = 'EPiServer.Shell.Storage.ComponentData'

Remember to backup your database first ;). 

Disclaimer: This is not recommended by EPiServer, this is my personal hack.

/Q

#89304
Aug 13, 2014 4:57
Vote:
 

Thank you both for the replies. We shall investigate these two options.

Doug

#89333
Aug 13, 2014 14:35
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.