Fórum

Assign user to site programmatically

thumbnail
Bharamani P Tashildar, modificado 6 Anos atrás.

Assign user to site programmatically

Junior Member Postagens: 48 Data de Entrada: 27/08/14 Postagens Recentes
Hi All,

How to assign user to site programmatically in Liferay Dxp?

Users are coming from Ldap to Liferay, after login I need to assign these users to site.


How can I achieve this?

Please help!!
thumbnail
Christoph Rabel, modificado 6 Anos atrás.

RE: Assign user to site programmatically (Resposta)

Liferay Legend Postagens: 1554 Data de Entrada: 24/09/09 Postagens Recentes
If it's the same site for all users, you could do it by configuration:
Control Panel -> Instance Settings -> Users -> Tab Default User Associations

You can add default associations for all users there.
Or if you need to do it by group, then you could import ldap groups too and assign the groups to the sites where they belong as members.
habeeb shaik, modificado 3 Anos atrás.

RE: Assign user to site programmatically

New Member Postagens: 2 Data de Entrada: 01/07/20 Postagens Recentes
while selecting site for user, it is loading for some time and then it come "gateway timeout error"
thumbnail
Olaf Kock, modificado 3 Anos atrás.

RE: Assign user to site programmatically

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
habeeb shaik:

while selecting site for user, it is loading for some time and then it come "gateway timeout error"

Gateway timeout is typically an error that your reverse proxy signals before it can reach any application server that it's expected to serve. You'll have to figure out why: Wrong URL, server died, conditional proxying, network issues, cluster setup problems - could be anything
habeeb shaik, modificado 3 Anos atrás.

RE: Assign user to site programmatically

New Member Postagens: 2 Data de Entrada: 01/07/20 Postagens Recentes
Thank you for you help