Foren
How to obtain the user id of visited user profile ?
Amar Daulatkar, geändert vor 12 Jahren.
How to obtain the user id of visited user profile ?
New Member Beiträge: 8 Beitrittsdatum: 30.03.12 Neueste Beiträge
Hello
I am using Liferay portal 6.0.1. Tell me how to find/get the user id of Richard Editor after going to his public page if i login as Bruno Admin.
I am using Liferay portal 6.0.1. Tell me how to find/get the user id of Richard Editor after going to his public page if i login as Bruno Admin.
Sandeep Nair, geändert vor 12 Jahren.
RE: How to obtain the user id of visited user profile ?
Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
you can try
Group group = themeDisplay.getLayout().getGroup();
long userId = 0;
if(group.isUser()){
userId = group.getClassPK();
}
Amar Daulatkar, geändert vor 12 Jahren.
RE: How to obtain the user id of visited user profile ?
New Member Beiträge: 8 Beitrittsdatum: 30.03.12 Neueste Beiträge
Thanks. It's working.
Dhrutika Parekh, geändert vor 12 Jahren.
RE: How to obtain the user id of visited user profile ?
Expert Beiträge: 435 Beitrittsdatum: 09.02.09 Neueste Beiträge
Hi ,
You can get it by using below method:
<%
User user2 = null;
if (group.isUser()) {
user2 = UserLocalServiceUtil.getUserById(group.getClassPK());
}
%>
user1:::<%= themeDisplay.getUser().getFullName()%>
user2::<%= user2.getFullName() %>
Here user2 will return you username of Richard Editor.
Regards,
Dhrutika
You can get it by using below method:
<%
User user2 = null;
if (group.isUser()) {
user2 = UserLocalServiceUtil.getUserById(group.getClassPK());
}
%>
user1:::<%= themeDisplay.getUser().getFullName()%>
user2::<%= user2.getFullName() %>
Here user2 will return you username of Richard Editor.
Regards,
Dhrutika
chirag @ India, geändert vor 11 Jahren.
RE: How to obtain the user id of visited user profile ?
Regular Member Beiträge: 129 Beitrittsdatum: 21.12.11 Neueste Beiträge
Hello Dhrutika
How to obtain the user id of visited user profile in velocity template ?
Help me
How to obtain the user id of visited user profile in velocity template ?
Help me
chirag @ India, geändert vor 11 Jahren.
RE: How to obtain the user id of visited user profile ?
Regular Member Beiträge: 129 Beitrittsdatum: 21.12.11 Neueste Beiträgechirag @ India:
Hello Dhrutika
How to obtain the user id of visited user profile in velocity template ?
Help me
I got Solution and look at this link post.