How to clear site search results upon login

cancel
Showing results for 
Search instead for 
Did you mean: 
Active Member II

How to clear site search results upon login

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
Senior Member II

Re: How to clear site search results upon login

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 & Regards,
Sanjay
Active Member II

Re: How to clear site search results upon login

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?

Senior Member II

Re: How to clear site search results upon login

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.

Thanks & Regards,
Sanjay