Fórum
how to fetch logged user details
Shilpa B, modificado 11 Anos atrás.
how to fetch logged user details
Junior Member Postagens: 61 Data de Entrada: 02/08/12 Postagens Recentes
Hi,
Need to fetch the logged user details in jsp. I'm able to fetch the email address and username with <%= user.getEmailAddress() %> and <%= user.getFullName()%>
But i'm not able to fetch the user address, Organization, job title, phone numbers like desk and mobile both.
Could you please help me to solve this.
Need to fetch the logged user details in jsp. I'm able to fetch the email address and username with <%= user.getEmailAddress() %> and <%= user.getFullName()%>
But i'm not able to fetch the user address, Organization, job title, phone numbers like desk and mobile both.
Could you please help me to solve this.
David H Nebinger, modificado 11 Anos atrás.
RE: how to fetch logged user details
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Using the user id you can access ContactLocalServiceUtil, etc., to access additional information.
Hitoshi Ozawa, modificado 11 Anos atrás.
RE: how to fetch logged user details
Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
User information entered from User Profile page is actually entered into several database tables. You'll need to use corresponding xxxxLocalServiceUtil method to get information.
address
contract_
phone
users_orgs
address
contract_
phone
users_orgs
Sagar A Vyas, modificado 11 Anos atrás.
RE: how to fetch logged user details
Liferay Master Postagens: 679 Data de Entrada: 17/04/09 Postagens RecentesShilpa B:
Hi,
Need to fetch the logged user details in jsp. I'm able to fetch the email address and username with <%= user.getEmailAddress() %> and <%= user.getFullName()%>
But i'm not able to fetch the user address, Organization, job title, phone numbers like desk and mobile both.
Could you please help me to solve this.
Hi Shilpa,
What I suggest is just fetch all your require elements at your controller with help of respective ***LocalServiceUtil and set all these in attributes and use them in jsp.
Cause otherwise your JSP will content lots of scriptlet code and that certainly not a good practices.
Thanks,
Sagar Vyas