Foren

Assign user to site programmatically

thumbnail
Bharamani P Tashildar, geändert vor 6 Jahren.

Assign user to site programmatically

Junior Member Beiträge: 48 Beitrittsdatum: 27.08.14 Neueste Beiträge
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, geändert vor 6 Jahren.

RE: Assign user to site programmatically (Antwort)

Liferay Legend Beiträge: 1554 Beitrittsdatum: 24.09.09 Neueste Beiträge
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, geändert vor 3 Jahren.

RE: Assign user to site programmatically

New Member Beiträge: 2 Beitrittsdatum: 01.07.20 Neueste Beiträge
while selecting site for user, it is loading for some time and then it come "gateway timeout error"
thumbnail
Olaf Kock, geändert vor 3 Jahren.

RE: Assign user to site programmatically

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
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, geändert vor 3 Jahren.

RE: Assign user to site programmatically

New Member Beiträge: 2 Beitrittsdatum: 01.07.20 Neueste Beiträge
Thank you for you help