Foros de discusión
DIsable multiple logins with same user
vijay sharma, modificado hace 10 años.
DIsable multiple logins with same user
New Member Mensajes: 15 Fecha de incorporación: 15/05/13 Mensajes recientes
Hi
I am using liferay-portal-5.2.3 .I want DIsable multiple logins with same user .
I checked in foram and found that use in portal-ext.properties file and change
auth.simultaneous.logins=false
but still is not working.If you know about this please help.
I am using liferay-portal-5.2.3 .I want DIsable multiple logins with same user .
I checked in foram and found that use in portal-ext.properties file and change
auth.simultaneous.logins=false
but still is not working.If you know about this please help.
Raja Seth, modificado hace 10 años.
RE: DIsable multiple logins with same user
Regular Member Mensajes: 233 Fecha de incorporación: 18/08/11 Mensajes recientes
Hi Vijay,
I haven't tried but refer to portal-impl\src\portal.properties where auth.simultaneous.logins=true. The comment says "This property is not used unless the property live.users.enabled is set to true" and by default live.users.enabled=false.
Make the following changes and see if it solves your problem.
Regards,
Raja
I haven't tried but refer to portal-impl\src\portal.properties where auth.simultaneous.logins=true. The comment says "This property is not used unless the property live.users.enabled is set to true" and by default live.users.enabled=false.
Make the following changes and see if it solves your problem.
Regards,
Raja
Pranoti Nandurkar, modificado hace 10 años.
RE: DIsable multiple logins with same user
Junior Member Mensajes: 48 Fecha de incorporación: 3/02/12 Mensajes recientes
Did you restart the server after change in portal-ext.properties file?
vijay sharma, modificado hace 10 años.
RE: DIsable multiple logins with same user
New Member Mensajes: 15 Fecha de incorporación: 15/05/13 Mensajes recientes
Yes I restart the server after change in portal-ext.properties file but still have same problem.
vijay sharma, modificado hace 10 años.
RE: DIsable multiple logins with same user
New Member Mensajes: 15 Fecha de incorporación: 15/05/13 Mensajes recientes
Hi
I have changed also in property files but still is not working.
do u have any idea that is this type features have in this version of liferay-portal-5.2.3.beacues I am trying to find but didn't get?
I have changed also in property files but still is not working.
do u have any idea that is this type features have in this version of liferay-portal-5.2.3.beacues I am trying to find but didn't get?
Tejas Kanani, modificado hace 10 años.
RE: DIsable multiple logins with same user
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
Hi Vijay,
AFAIK, Preventing user to login simultaneously is not available in Liferay 5.2.3. As neither portal.properties has "auth.simultaneous.logins=false" property nor LoginUtil.java has any code which prevent simultaneous login for Liferay 5.2.3
So if you need that in Liferay 5.2.3, you'll have to add it somehow by overriding existing code.
Thanks,
Tejas
AFAIK, Preventing user to login simultaneously is not available in Liferay 5.2.3. As neither portal.properties has "auth.simultaneous.logins=false" property nor LoginUtil.java has any code which prevent simultaneous login for Liferay 5.2.3
So if you need that in Liferay 5.2.3, you'll have to add it somehow by overriding existing code.
Thanks,
Tejas
vijay sharma, modificado hace 10 años.
RE: DIsable multiple logins with same user
New Member Mensajes: 15 Fecha de incorporación: 15/05/13 Mensajes recientes
Hi Tejas,
Thanks for your revert.
Appreciate if you can share any sample code which helps address this issue.
Thanks for your revert.
Appreciate if you can share any sample code which helps address this issue.
Tejas Kanani, modificado hace 10 años.
RE: DIsable multiple logins with same user
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
This is the code which exist in Liferay 6.1 -- LoginUtil.java -> login method, check it out it might help you.
if (!PropsValues.AUTH_SIMULTANEOUS_LOGINS) {
Map<string, usertracker> sessionUsers = LiveUsers.getSessionUsers(
company.getCompanyId());
List<usertracker> userTrackers = new ArrayList<usertracker>(
sessionUsers.values());
for (UserTracker userTracker : userTrackers) {
if (userId != userTracker.getUserId()) {
continue;
}
JSONObject jsonObject = JSONFactoryUtil.createJSONObject();
ClusterNode clusterNode =
ClusterExecutorUtil.getLocalClusterNode();
if (clusterNode != null) {
jsonObject.put(
"clusterNodeId", clusterNode.getClusterNodeId());
}
jsonObject.put("command", "signOut");
long companyId = CompanyLocalServiceUtil.getCompanyIdByUserId(
userId);
jsonObject.put("companyId", companyId);
jsonObject.put("sessionId", userTracker.getSessionId());
jsonObject.put("userId", userId);
MessageBusUtil.sendMessage(
DestinationNames.LIVE_USERS, jsonObject.toString());
}
}
if (PropsValues.SESSION_ENABLE_PHISHING_PROTECTION) {
....
....
</usertracker></usertracker></string,>
vijay sharma, modificado hace 10 años.
RE: DIsable multiple logins with same user
New Member Mensajes: 15 Fecha de incorporación: 15/05/13 Mensajes recientes
Hi Tejas,
Thanks for your revert.
I checked as given your code but still have same issue.May be I am doing any mistake.
Would you please suggest more for same.
Thanks for your revert.
I checked as given your code but still have same issue.May be I am doing any mistake.
Would you please suggest more for same.
Tejas Kanani, modificado hace 10 años.
RE: DIsable multiple logins with same user
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
What changes you have made ? And in which file ?
Can you please share your modified code ?
Can you please share your modified code ?
vijay sharma, modificado hace 10 años.
RE: DIsable multiple logins with same user
New Member Mensajes: 15 Fecha de incorporación: 15/05/13 Mensajes recientes
HI Tejas,
we have done some changes in portal-impl.jar file in loginutil.java and PropsValues.java class.
As given your code we put inside loginutil.java and also complied but it's not working.
we have done some changes in portal-impl.jar file in loginutil.java and PropsValues.java class.
As given your code we put inside loginutil.java and also complied but it's not working.
Tejas Kanani, modificado hace 10 años.
RE: DIsable multiple logins with same user
Liferay Master Mensajes: 654 Fecha de incorporación: 6/01/09 Mensajes recientes
Any errors in backhand ? And even I've not tried it personally just share the code which exist in current version.
Tried by debugging the code and check whether its executing properly.
Tried by debugging the code and check whether its executing properly.