掲示板

Adding Users to Liferay

6年前 に Shireesha Veerapaneni によって更新されました。

Adding Users to Liferay

New Member 投稿: 12 参加年月日: 17/07/05 最新の投稿
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
6年前 に Samuel Kong によって更新されました。

RE: Adding Users to Liferay

Liferay Legend 投稿: 1902 参加年月日: 08/03/10 最新の投稿
No. Why do you need to change the id?
6年前 に Shireesha Veerapaneni によって更新されました。

RE: Adding Users to Liferay

New Member 投稿: 12 参加年月日: 17/07/05 最新の投稿
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
6年前 に Shireesha Veerapaneni によって更新されました。

RE: Adding Users to Liferay

New Member 投稿: 12 参加年月日: 17/07/05 最新の投稿
I am trying to access user information in controller as below.

String userName = request.getRemoteUser();

I want to get user login information.
thumbnail
6年前 に Olaf Kock によって更新されました。

RE: Adding Users to Liferay

Liferay Legend 投稿: 6403 参加年月日: 08/09/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(); 
6年前 に Shireesha Veerapaneni によって更新されました。

RE: Adding Users to Liferay

New Member 投稿: 12 参加年月日: 17/07/05 最新の投稿
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
6年前 に Manish Yadav によって更新されました。

RE: Adding Users to Liferay

Expert 投稿: 493 参加年月日: 12/05/26 最新の投稿
You can use screen name instead of userid .Screen Name also always unique.
6年前 に Shireesha Veerapaneni によって更新されました。

RE: Adding Users to Liferay

New Member 投稿: 12 参加年月日: 17/07/05 最新の投稿
True.
Screen name is unique but our third party system authentication is configured based on email address.
6年前 に Shireesha Veerapaneni によって更新されました。

RE: Adding Users to Liferay

New Member 投稿: 12 参加年月日: 17/07/05 最新の投稿
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
6年前 に Olaf Kock によって更新されました。

RE: Adding Users to Liferay

Liferay Legend 投稿: 6403 参加年月日: 08/09/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?