掲示板

Different Logout Page based on Community

13年前 に Ayaz Pasha によって更新されました。

Different Logout Page based on Community

New Member 投稿: 9 参加年月日: 08/07/31 最新の投稿
Hi All,

I have a requirement to redirect a user belonging to a particular community to a particular page after he/she signs out.

To make it more clear, lets suppose we have 3 communities by name Community A, Community B & Community C. Lets say a User belongs to all these communities. For us Community C is a special community so when User navigates to Community C pages and when he/she opts to Sign Out from this special community he/she should be redirected to a special page rather than default logout page, whereas, when he/she opts to sign out from other communities A & B he/she should be redirected to common logout page.

I don't know if there is a setting for this requirement in configuration. If not then which class(es) can I look out for modification to achieve this?

Let me know if more clarification is needed.


Thanks
Ayaz
thumbnail
13年前 に Vishal Mehta によって更新されました。

RE: Different Logout Page for different User based on Community

Junior Member 投稿: 42 参加年月日: 11/03/08 最新の投稿
I don't think it is possible to achieve such a functionality without customization. However, if you are ok to have each community as a separate tenant, the functionality can be implemented OOB.
13年前 に Ayaz Pasha によって更新されました。

RE: Different Logout Page for different User based on Community

New Member 投稿: 9 参加年月日: 08/07/31 最新の投稿
I don't think it is possible to achieve such a functionality without customization.
-- Agree

However, if you are ok to have each community as a separate tenant, the functionality can be implemented OOB.
-- Can you please put some more light on this?

I am just trying to customize either of these classes ServicePreAction, ServicePostAction, LogoutAction, LogoutPreAction, DefaultLogoutPageAction but with no help as I am not able to get the current community details in either of these classes using which I can override the default logout page configuration/setting as soon as the user clicks Sign Out.
thumbnail
13年前 に Vishal Mehta によって更新されました。

RE: Different Logout Page for different User based on Community

Junior Member 投稿: 42 参加年月日: 11/03/08 最新の投稿
If possible can you please help me understand the business context of your requirement to enable me understand this better.

Sign-out function is universal; means you sign-out of the portal and not community / organization. Now if your requirement is to track the source from which sign-out was triggered and display sign-out page appropriately, that can not be achieved OOB.

However, if you are trying to implement this because you have multiple clients (say aaa.com, bbb.com, etc.) and want to host all of them on the same server but present different sign-in and sign-out screens to each. You can achieve this by creating private communities for each client or using multi-tenancy. So with more details on your requirements I can suggest you an option and source for more details.
13年前 に Ayaz Pasha によって更新されました。

RE: Different Logout Page for different User based on Community

New Member 投稿: 9 参加年月日: 08/07/31 最新の投稿
Thanks for the info,

I could achieve it by modifying the init_custom.vm, below is my code.


#if($group.getFriendlyURL().contains("special_group_name"))
        #set ($company_url = "/web"+$group.getFriendlyURL())
        #set ($sign_out_url = (($theme_display.getURLSignOut())+("?referer=")+$company_url))
#else
        #set ($sign_out_url = ($theme_display.getURLSignOut()))
#end



More information here
12年前 に simon tuffle によって更新されました。

RE: Different Logout Page for different User based on Community

Regular Member 投稿: 150 参加年月日: 09/05/18 最新の投稿
Hi Ayaz Pasha,

Even i am trying out the same thing. I kept the same code in init_custom.vm, but its not working.
Actually i need the signout url for the community "mob" . So Kept the code as below:

code:

#if($group.getFriendlyURL().contains("mob"))
#set ($company_url = "/web"+$group.getFriendlyURL())
#set ($sign_out_url = (($theme_display.getURLSignOut())+("?referer=")+$company_url))
#else
#set ($sign_out_url = ($theme_display.getURLSignOut()))
#end

Could you please tell me where i have gone wrong. Is there any way to debug this .

Anyway thanks in advance.

Regds,
12年前 に simon tuffle によって更新されました。

RE: Different Logout Page for different User based on Community

Regular Member 投稿: 150 参加年月日: 09/05/18 最新の投稿
hi,

I have meet the target,

Rgds,