Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rohit Jain
Problem: The Community Sign Out redirects to guest community default page
May 7, 2008 6:22 AM
Answer

Rohit Jain

Rank: New Member

Posts: 14

Join Date: April 22, 2008

Recent Posts

I have created a community and the user uses the user friendly community URL to get to it. Login works fine and displays login form with in the context of the community, but logout does not redirect user to the community home page instead it redirects one to the Guest Community's default page.

Please suggest or advice how I can change the behaviour of sign out only in the context of a community, such that when the user logs out of a community they are redirected to that community's public default page.

I have multiple communities in one instance of the portal. Would love to see if I can achieve this through theme customization. May be a change in dock.vm. I have custom theme for every community.
Cioloca Cecilia
RE: Problem: The Community Sign Out redirects to guest community default
July 6, 2008 10:23 PM
Answer

Cioloca Cecilia

Rank: New Member

Posts: 11

Join Date: March 13, 2008

Recent Posts

Hey,

I have the same problem. Did not find a solution yet.
If anybody knows how to solve this problem, please be so kind an post a solution.

Tnx
Parul Seth
RE: Problem: The Community Sign Out redirects to guest community default
December 18, 2008 1:18 AM
Answer

Parul Seth

Rank: Junior Member

Posts: 83

Join Date: December 18, 2008

Recent Posts

Hi All

I am having the same issue. If anybody is aware of a solution. Kindly help. Its really urgent.

Thanks & Regards
Parul
Parul Seth
RE: Problem: The Community Sign Out redirects to guest community default
June 28, 2009 12:33 AM
Answer

Parul Seth

Rank: Junior Member

Posts: 83

Join Date: December 18, 2008

Recent Posts

Hey guys!

Problem solved emoticon.

Here's the solution:

All we need to do is make a small little change in [edit on 28/06/09] html\themes\_unstyled\templates\init.vm (liferay 5.12)

change #set ($sign_out_url = $theme_display.getURLSignOut())

to
#set ($sign_out_url = (($theme_display.getURLSignOut())+("?referer=")+($theme_display.getURLCurrent())))

PS: referer is actually the COMMON_REFERER parameter which redirects to the desired sign out page.

Which in the above case is the current url on sign out emoticon. You can add the referer as per your need.

I hope this works for you too. It truely worked for me emoticon.

Thanks & Regards

Parul Seth
Ramesh J
RE: Problem: The Community Sign Out redirects to guest community default
October 31, 2009 10:18 PM
Answer

Ramesh J

Rank: Junior Member

Posts: 43

Join Date: July 21, 2009

Recent Posts

Solved it by adding the following code to init_custom.vm

 1
 2#if ($layout)
 3    #set ($group = $layout.getGroup())
 4
 5        #set ($organizationLocalService = $serviceLocator.findService("com.liferay.portal.service.OrganizationLocalService"))
 6        #set ($organization = $organizationLocalService.getOrganization($group.getClassPK()))
 7
 8        #set ($company_url = "/web"+$group.getFriendlyURL())
 9        #set ($sign_out_url = (($theme_display.getURLSignOut())+("?referer=")+$company_url))
10    #end
11#end
Sana Afreen Yadgir
RE: Problem: The Community Sign Out redirects to guest community default
May 8, 2012 9:33 PM
Answer

Sana Afreen Yadgir

Rank: New Member

Posts: 4

Join Date: May 8, 2012

Recent Posts

Hello,
I have resolved these issue by Theme development.
As the community theme folder contains the init_custom.vm file.This file used to override and define new Velocity variablesset the sign out url and assign the referer variable as community home url.
#set ($sign_out_url = (($theme_display.getURLSignOut())+("?referer=")+("/web/communityname/home")))

Regards,
Sana
David H Nebinger
RE: Problem: The Community Sign Out redirects to guest community default
May 8, 2012 9:41 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11787

Join Date: September 1, 2006

Recent Posts

Hopefully you're saying you did this by creating a custom theme, not just editing the file directly under webapps/ROOT/...