Issue Details (XML | Word | Printable)

Key: LEP-3518
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: SE Support
Reporter: Rainer Schmitz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
INTERNAL - Old Liferay Portal (Use Liferay Portal Standard Edition)

Retrieve user and role information by screenname

Created: 14/Aug/07 07:38 AM   Updated: 08/Nov/07 11:20 PM
Component/s: None
Affects Version/s: 4.3.0
Fix Version/s: 4.3.5, 4.4.0

Time Tracking:
Not Specified


 Description  « Hide
After the conversion of userId to type long, and the introduction of a screenname it's very difficult to retrieve information from outside of Liferay (e.g. using SOAP).
In our company we use a central LDAP repository. We map the LDAP uid to Liferay screennames, but for example it is not possible to retrieve a user's roles using SOAP because RoleServiceSoap only provides getUserRoles(userId).
Storing the Liferay userId in LDAP is at most inconvenient (if not impossible) because we are using portal instances and the same user will have different userId in both, whereas we can assure he is using the same screen name.

A simple solutiion would be a service returning the userId for a given screenname.

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Brian Chan added a comment - 21/Aug/07 04:22 PM
See UserLocalServiceUtil.getUserIdByScreenName to do just that.

Rainer Schmitz added a comment - 22/Aug/07 12:51 AM
I'm retrieving the information from outside of Liferay (another webapplication in the same Tomcat, that is).
So I'm constrained to the methods in portal-client.jar, namely the SOAP interface.

The SOAP accessor to UserLocalServiceUtil is UserServiceSoap, but there is only a method getUserByScreenName, no getUserIdByScreenName. The former needs some form of authentication, if I recall correctly.

So my proposal is to add UserServiceSoap.getUserIdByScreenName.

Alexander Chow added a comment - 08/Nov/07 11:16 PM
Checked into SVN.