Fórum

Restrict multiple user login

thumbnail
Syed Nasar, modificado 7 Anos atrás.

Restrict multiple user login

Junior Member Postagens: 64 Data de Entrada: 03/09/15 Postagens Recentes
Hi ,
I dont want user to allow to login from the multiple pc, if user has already logged from one pc and tried to login from the another pc, the first session should be logged out,can anyone please help me?
thumbnail
Pankaj Kathiriya, modificado 7 Anos atrás.

RE: Restrict multiple user login (Resposta)

Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
You can use below portal property to achieve what you want.

#
# Set the following to true if users are allowed to have simultaneous logins
# from different sessions. This property is not used unless the property
# "live.users.enabled" is set to true.
#
auth.simultaneous.logins=false
Please note that you have to all set live.users.enabled property to true. Put these properties in your portal's portal-ext.properties file.

The first session will be logged-out when you login through different browser/machine
thumbnail
Syed Nasar, modificado 7 Anos atrás.

RE: Restrict multiple user login

Junior Member Postagens: 64 Data de Entrada: 03/09/15 Postagens Recentes
Hi Pankaj,

Thank you for your valuable response. But these properties doesn't work for me. Is any thing I need to add?
thumbnail
Pankaj Kathiriya, modificado 7 Anos atrás.

RE: Restrict multiple user login

Liferay Master Postagens: 722 Data de Entrada: 05/08/10 Postagens Recentes
Do you have any custom login code implemented?
What you have tried? and What behavior you are seeing?

These properties should work out of box. For more detail, you can look into the code of com.liferay.portlet.login.util.LoginUtil.login method.
thumbnail
Syed Nasar, modificado 7 Anos atrás.

RE: Restrict multiple user login

Junior Member Postagens: 64 Data de Entrada: 03/09/15 Postagens Recentes
Hi Pankaj,
Its working when I tried in new server. Thank You. And shall we able to display some alert kind of thing when the user logged in new system (like "You are logged in another system. Do you want to login here?")?