Fórumok
Unable to get the location of the logged in user
Madhura Shetty, módosítva 8 év-val korábban
Unable to get the location of the logged in user
Junior Member Bejegyzések: 80 Csatlakozás dátuma: 2013.11.07. Legújabb bejegyzések
Please let me know how to get the location of the logged in user in liferay . I am using LDAP settings for authentication.
I am able to get the loggedin user email address but the Location.
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
String loggedinemailID = themeDisplay.getUser().getDisplayEmailAddress();
But i dont know what to use for Location.
Please help
I am able to get the loggedin user email address but the Location.
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
String loggedinemailID = themeDisplay.getUser().getDisplayEmailAddress();
But i dont know what to use for Location.
Please help
Meera Prince, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
Hi
I think we need to install some app to find location of user. try this app.
https://github.com/liferay/liferay-plugins/tree/master/portlets/ip-geocoder-portlet
Also look at following links it may help yiu
http://stackoverflow.com/questions/5514912/how-to-find-users-location-during-a-web-site-visit
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation
Regards,
Meera Prince
I think we need to install some app to find location of user. try this app.
https://github.com/liferay/liferay-plugins/tree/master/portlets/ip-geocoder-portlet
Also look at following links it may help yiu
http://stackoverflow.com/questions/5514912/how-to-find-users-location-during-a-web-site-visit
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation
Regards,
Meera Prince
David H Nebinger, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 14916 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Geez, Meera, I know you're in a posting mood lately, but you could try actually reading the post before spewing incorrect/irrelevant information as a response.
The Location organization type is just a relationship for the user. You find the "org" they belong to and that, if it is a Location org type, will be their location.
The hard part of course is if they belong to multiple locations, you can't really distinguish which Location they happen to be at.
The Location organization type is just a relationship for the user. You find the "org" they belong to and that, if it is a Location org type, will be their location.
The hard part of course is if they belong to multiple locations, you can't really distinguish which Location they happen to be at.
Meera Prince, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
Hi
I follow your suggestion and thank you very much..David from the question I thought of finding user location from where he/she login. However I agree with you..
Regards,
Meera Prince
I follow your suggestion and thank you very much..David from the question I thought of finding user location from where he/she login. However I agree with you..
Regards,
Meera Prince
Jack Bakker, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Master Bejegyzések: 978 Csatlakozás dátuma: 2010.01.03. Legújabb bejegyzésekMadhura Shetty:
Please let me know how to get the location of the logged in user in liferay . I am using LDAP settings for authentication.
I am able to get the loggedin user email address but the Location.
ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
String loggedinemailID = themeDisplay.getUser().getDisplayEmailAddress();
But i dont know what to use for Location.
Please help
Madhura, what do you mean exactly by 'location' ?
address info ? longitude/latitude ? association with a location organization ?
Madhura Shetty, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Junior Member Bejegyzések: 80 Csatlakozás dátuma: 2013.11.07. Legújabb bejegyzések
Under Active Directory we have saved the users Office details so, I want to know to which office the users belongs through liferay.
Meera Prince, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
HI
Generally in LDAP integration with Liferay in the portal configuration we need to map LDAP user attributes with Liferay user attributes so that data will be stored in the liferay related user tables.So you need find required ldap attribute and map with liferay user attribute so that data will be available in the liferay tables with respect to user.Go to liferay portal configuration and look at LDAP authentication part and you can understand more.
'Try below link it may help you something..
http://www.liferaysavvy.com/2013/10/liferay-ldap-integration_8.html
Regards,
Meera Prince
Generally in LDAP integration with Liferay in the portal configuration we need to map LDAP user attributes with Liferay user attributes so that data will be stored in the liferay related user tables.So you need find required ldap attribute and map with liferay user attribute so that data will be available in the liferay tables with respect to user.Go to liferay portal configuration and look at LDAP authentication part and you can understand more.
'Try below link it may help you something..
http://www.liferaysavvy.com/2013/10/liferay-ldap-integration_8.html
Regards,
Meera Prince
David H Nebinger, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 14916 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Groups can be pulled in by the LDAP importer, but I don't think organization is.
The good news is that it is "easy" to extend the Liferay LDAP importer to manage your own attribute importing. You may find that you need to do the organization assignment yourself.
The good news is that it is "easy" to extend the Liferay LDAP importer to manage your own attribute importing. You may find that you need to do the organization assignment yourself.
Meera Prince, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
Hi
We might create expando column for user/ custom user filed and we can map ldap attribute to user custom attributes. this is also one of the way to keep.location. hope it will help.
Regards,
Meera Prince
We might create expando column for user/ custom user filed and we can map ldap attribute to user custom attributes. this is also one of the way to keep.location. hope it will help.
Regards,
Meera Prince
David H Nebinger, módosítva 8 év-val korábban
RE: Unable to get the location of the logged in user
Liferay Legend Bejegyzések: 14916 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Rarely is it a good idea to create a custom field to hold a value for which Liferay has existing columns/entities to hold the data already. Liferay knows how to join on columns that it's aware of; custom fields do not play any role in normal Liferay operation.