Fórum

Different Home URL per user

Sanketh Iyer, modificado 9 Anos atrás.

Different Home URL per user

Junior Member Postagens: 25 Data de Entrada: 02/02/12 Postagens Recentes
Hi,

I have a requirement where I need different home URL for users belong to different sites.
For example , there are 2 users- userA and userB, 2 sites- siteA and siteB.
userA belongs to siteA and userB belongs to siteB.

Now according to the default liferay logic, if i enter the root URLhttp://localhost:8080, then the page is redirect to the URL based on the portal property company.default.home.url

Now my requirement is that if I am logged in as userA, and I enter http://localhost:8080 in the URL the I get redirect to /group/site-a.

And if I am logged in as userB, and I enter http://localhost:8080 in the URL the I get redirect to /group/site-b.

Could somebody help me out with this?

Thanks in advance.
thumbnail
Pankaj Kathiriya, modificado 9 Anos atrás.

RE: Different Home URL per user

Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
Hi Sanketh,

Please have a look at marketplace app.

Your requirement is covered in this app.

Regards
thumbnail
Jay Trivedi, modificado 9 Anos atrás.

RE: Different Home URL per user

Regular Member Postagens: 109 Data de Entrada: 24/11/12 Postagens Recentes
Hi Sanketh,

You need to create Post Login Hook. and compare users in the condition based on that forward...you can refer the app link for more implementation details.
Sanketh Iyer, modificado 9 Anos atrás.

RE: Different Home URL per user

Junior Member Postagens: 25 Data de Entrada: 02/02/12 Postagens Recentes
I think you misunderstood my question.

I don't require a post login hook.

My functionality is that after a user is logged in, s/he manually enters the url http://localhost:8080 and then clicks ENTER key.

It currently redirects to the company.default.home.url
thumbnail
Pankaj Kathiriya, modificado 9 Anos atrás.

RE: Different Home URL per user (Resposta)

Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
I agree. You can override ServicePostAction event using hook. It may help you to redirect to user's group page.
Sanketh Iyer, modificado 9 Anos atrás.

RE: Different Home URL per user

Junior Member Postagens: 25 Data de Entrada: 02/02/12 Postagens Recentes
Hi Pankaj,

I used a ServicePreAction for redirection. But a ServicePostAction would have worked as well.
Thanks for you help.

Regards,
Sanketh