留言板

Adding Users to Liferay

Shireesha Veerapaneni,修改在6 年前。

Adding Users to Liferay

New Member 帖子: 12 加入日期: 17-7-5 最近的帖子
I am trying to use User and Organizations in Control panel.
Control panel >Users>Users and Organizations
When I add user there is a unique user id that gets generated. I am having issues with that unique Id. Can we change that ID ?
Attached screen shots for your reference.

Thanks
Isha
thumbnail
Samuel Kong,修改在6 年前。

RE: Adding Users to Liferay

Liferay Legend 帖子: 1902 加入日期: 08-3-10 最近的帖子
No. Why do you need to change the id?
Shireesha Veerapaneni,修改在6 年前。

RE: Adding Users to Liferay

New Member 帖子: 12 加入日期: 17-7-5 最近的帖子
We are using third party systme (UIMS) for authentication and authorization.
We have users already added to that system from our application. We need to send user name to them in order to authorize the logged in user. Liferay is sending this user ID which is not identified by UIMS.
Which fails to get access to the portlet.

Thanks
Isha
Shireesha Veerapaneni,修改在6 年前。

RE: Adding Users to Liferay

New Member 帖子: 12 加入日期: 17-7-5 最近的帖子
I am trying to access user information in controller as below.

String userName = request.getRemoteUser();

I want to get user login information.
thumbnail
Olaf Kock,修改在6 年前。

RE: Adding Users to Liferay

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
In that case the (seemingly custom) integration is wrong and you shouldn't rely on the numeric ID (as it's obviously different) but rather should use a value that's shared by both systems. E.g. you can get the current user from the themeDisplay object (from within a portlet):

themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
User user=themeDisplay.getUser(); 
Shireesha Veerapaneni,修改在6 年前。

RE: Adding Users to Liferay

New Member 帖子: 12 加入日期: 17-7-5 最近的帖子
I got this fixed using as below

String id = request.getRemoteUser();
User user = UserServiceUtil.getUserById(Long.parseLong(id));
String userName = user.getEmailAddress();
logger.debug( "The remote user is " + userName );

This worked for me. emoticon

Thank You so much.
thumbnail
Manish Yadav,修改在6 年前。

RE: Adding Users to Liferay

Expert 帖子: 493 加入日期: 12-5-26 最近的帖子
You can use screen name instead of userid .Screen Name also always unique.
Shireesha Veerapaneni,修改在6 年前。

RE: Adding Users to Liferay

New Member 帖子: 12 加入日期: 17-7-5 最近的帖子
True.
Screen name is unique but our third party system authentication is configured based on email address.
Shireesha Veerapaneni,修改在6 年前。

RE: Adding Users to Liferay

New Member 帖子: 12 加入日期: 17-7-5 最近的帖子
HI,
We are currently migrating web center portal (portlets) to liferay portal. Most commonly I am seeing issue on UI (JSP pages).
JSP pages have javascripts in them and none of the javascript functions are triggered on liferay.
Appreciate if someone can help me with this issue.
There are coupl action buttons in JSP file and non of those buttons are working and reason is associated javascript function are not been called.

Thanks
Shireesha Veerapaneni
thumbnail
Olaf Kock,修改在6 年前。

RE: Adding Users to Liferay

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Shireesha Veerapaneni:
Appreciate if someone can help me with this issue.
There are coupl action buttons in JSP file and non of those buttons are working and reason is associated javascript function are not been called.

You're probably aware that we'll need some more details in order to help?