cancel
Showing results for 
Search instead for 
Did you mean: 

How to clear site search results upon login

mehar460
Confirmed Champ
Confirmed Champ

How to remove the last searched keyword from Site Search when user logs in?

My requirement is that when user logs in Site Search dashlet should be empty and any searches made from there after should be active during user session.

3 REPLIES 3

sanjaybandhniya
Elite Collaborator
Elite Collaborator

Hi,

This search term and result of that term  are stored in Preferences so you have to remove that to clear out search result during new login.

you can do that change in site-search.js to clear preferences.

Thanks,

Contcentric

Thanks Sanjay.

Buy my requirement is to clear the search keyword and results (preferences) during login (only once), not every time user move away from site dashboard.

Also I have set user home page as Site home page for some of the users, in this case, will it work?

I think this search is stored in user preferences so first thing you have to find how they are storing ?(I haven't trid)

After that clear that preferences as soon as login is complete.