Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Syed Umair
logout problem
October 29, 2012 11:20 PM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

Hi,

I am developing a portal in liferay 6.1.1 CE. The problem I am facing is when user logs out from portal, he or she can revisit the portal pages using browsers back button. I don't want to allow the users to do that. How can I disable this feature.

Any valuable suggestions, please??? emoticon
Thnx,
Umair
Subhash Pavuskar
RE: logout problem
October 29, 2012 11:34 PM
Answer

Subhash Pavuskar

Rank: Regular Member

Posts: 234

Join Date: March 12, 2012

Recent Posts

Hey !!


You should place the following JavaScript code in your home page header section.if you move from page1 to page2, and want to disable the browser back in page 2.

1<script>
2if(window.history.forward(1) != null)
3                 window.history.forward(1);
4</script>



Hope this may help you !!
Bart Simpson
RE: logout problem
October 29, 2012 11:42 PM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

When user revisits the portal page by back button, does it show the user as logged in? I saw this once in one of the beta versions of Liferay, and specifically for IE but I think it was reported to Liferay.
Syed Umair
RE: logout problem
October 29, 2012 11:45 PM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

Hi Subhash Pavuskar,

thnx for reply, but I have tried this one. It works for all pages even if user is signed in. I want to disable back only when user is sign out.
Syed Umair
RE: logout problem
October 29, 2012 11:47 PM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

Hi Bart Simpson,

It shows all private pages and user can navigate only by back button, yes no links work but I want that user should not see my private pages data as well.
Bart Simpson
RE: logout problem
October 29, 2012 11:57 PM
Answer

Bart Simpson

Rank: Liferay Master

Posts: 523

Join Date: August 29, 2011

Recent Posts

something similar , has been reported, check the fix http://issues.liferay.com/browse/LPS-16367
Syed Umair
RE: logout problem
October 30, 2012 12:05 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

yeah, I have seen this fix. But don't know why, I am still facing this problem... emoticon
Gaurav Jain
RE: logout problem
October 30, 2012 12:29 AM
Answer

Gaurav Jain

Rank: Regular Member

Posts: 141

Join Date: January 31, 2011

Recent Posts

Syed Umair:
Hi Subhash Pavuskar,

thnx for reply, but I have tried this one. It works for all pages even if user is signed in. I want to disable back only when user is sign out.


You may put this script in condition so that it should be applied only when user is signed-out
Syed Umair
RE: logout problem
October 30, 2012 12:39 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

Gaurav, can you explain the condition that should be applied. I am unable to do this.
Nikhil Nishchal
RE: logout problem
October 30, 2012 2:21 AM
Answer

Nikhil Nishchal

Rank: Junior Member

Posts: 82

Join Date: June 21, 2012

Recent Posts

you can hook to login portlet that after clicking logout button or visiting logout url this JS should call.

Also can be manage by theme if logout button manage through theme.
Syed Umair
RE: logout problem
November 5, 2012 12:46 AM
Answer

Syed Umair

Rank: Junior Member

Posts: 36

Join Date: October 11, 2012

Recent Posts

If anyone interested, I have solved my problem by add following code in portal-ext.properties file.
1browser.cache.signed.in.disabled=true