Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Help regarding using UpdateUserInfo method
WebTeam_WebTeam_(x-genzymeuser2_-_(deleted))
Can Somebody send some C# sample code to update or change a user's password using UpdateUserInfo method. I would appreciate your quick reply and a solution for my problem.Thank YouPrabhakar
Find more posts tagged with
Comments
Ann_Minton
You don't mention what problem you are having, but if you are attempting to update the user's password by changing the value of UserPWD, you can't do this. The LAPI Developer's References states: "You cannot directly update the UserPWD field, but you can change a user's password by specifying Password in the Name field of the attributes Assoc in the UpdateUserInfo function."
WebTeam_WebTeam_(x-genzymeuser2_-_(deleted))
Thank You Very much for your reply AnnHere is my problem:When i try to update the password with UpdateUserInfo,it is returning this error number -21474282647 and the llSession.getStatusMessage() returns the error message as "Argument: Attributes (Attributes) was the wrong type".As you said I am even aware of the the LAPI Developer's References statement:"You cannot directly update the UserPWD field, but you can change a user's password by specifying Password in the Name field of the attributes Assoc in the UpdateUserInfo function."taking into consideration of that statement i tried specifying Password in the Name field,but i am not sure whether i am doing it in a right way.So just to check whether UpdateUserInfo is working or not i got the user info by using GetUserInfo and sent that user info as it is with UpdateUserInfo,even then it is giving me the same above mentioned error.Prabhakar
x-scoruser8_-_(deleted)
Here's a couple of examples.JAVA/** * Insert the method's description here. * Creation date: (4/1/2003 10:25:24 AM) *
@return
boolean *
@param
login java.lang.String *
@param
newPwd java.lang.String */public boolean changePassword(String login, String newPwd) { LLValue llvNewPw = new LLValue().setAssoc(); llvNewPw.add("Password", newPwd); if (getLapiUsers().UpdateUserInfo(login,llvNewPw)==0 ) { return true; } else { return false; }}C++void CChangePWDView::ProcessNewUsers(){ LLSTATUS S = 0; LLVALUE attribs; S = LL_ValueAlloc( &attribs ) ; S = LL_ValueSetAssocInArgs(attribs ); S = LL_AssocSetString( attribs, "Password", "newPassword"); CString strOutPut('Z',256); S = LL_UpdateUserInfo(m_session,m_pSet->m_NAME, attribs );}
WebTeam_WebTeam_(x-genzymeuser2_-_(deleted))
Thanks Glenn,Basic upon the java code example you gave i changed my code and that cleared my previous problem but i am still unable to update the User password.This time it is returning me error number 401907 and the error message is "Unable to update the user info".Prabhakar
WebTeam_WebTeam_(x-genzymeuser2_-_(deleted))
I also tried using the 'LiveServices' (LiveLink WebServices) to change the user password. It gave me the following Error. System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> OpenText.LiveServices.LiveServicesException: Unable to update the user info: ErrMsg=Insufficient privileges to change user 'pedru01'.at OpenText.LiveServices.Users.SetUserPassword(SessionInfo sessionInfo, String userName, String domainName, String password)Seems like Privileges problem, but was able to change the password directly from LiveLink website.
x-scoruser8_-_(deleted)
Are you saying that you can change the password via the standard livelink interface with the same login you are using to log in to lapi? If so, this sounds like you'll need to open a ticket on it.....In my example I use a login that has useradmin rights to reset the password of the target login.
WebTeam_WebTeam_(x-genzymeuser2_-_(deleted))
Yes, Now I'll do as you are doing in your example.I'll come up with what i've got.I appreciate your follow up glenn! Thanks.