Click or drag to resize

RuntimeServiceUpdateUser Method

Updates a user. Intended for web use only.

Namespace:  Advantys.Workflow.Web.Services.Processes.Runtime
Assembly:  Advantys.Workflow.Web.Services.Processes.Runtime (in Advantys.Workflow.Web.Services.Processes.Runtime.dll) Version: 7.15.0.29499 (7.15.0.201904253)
Syntax
public void UpdateUser(
	string username,
	string userDefinition
)

Parameters

username
Type: SystemString
The username of the user to update.
userDefinition
Type: SystemString
Definition of the updated user as an XML string. Element names are case sensitive.
Remarks
Available since WorkflowGen version: 6.2.0

Optional Parameters.

These parameters can be used in the query string or as parameters of the Headers object in the RuntimeService class instance. See example below.

IgnoreMissingAssociations (bool)Sets whether or not to return an error when an association (group) is missing from the target. Default = true.

Sample user definition to update an email:
XML
<User>
  <Email>new.email@companycom</Email>  
</User>

Complete user definition with updatable fields:
XML
<User>  
  <Directory>
    <Name>WORKFLOWGEN</Name>
  </Directory>  
  <FirstName>First name</FirstName>
  <LastName>Last name</LastName>
  <Username>Username</Username>
  <Email>email@company.com</Email>
  <Profile>User</Profile> <!-- User, Administrator -->
  <Active>Y</Active> <!-- Y, N -->
  <Synchronized>Y</Synchronized> <!-- Y, N -->
  <DefaultLanguage>en-CA</DefaultLanguage>
  <DefaultTimeZoneId>9</DefaultTimeZoneId>  
  <Phone></Phone>
  <Mobile></Mobile>
  <Fax></Fax>
  <Pager></Pager>
  <Office></Office>
  <Department></Department>
  <Company></Company>
  <JobTitle></JobTitle>
  <EmployeeType></EmployeeType>
  <Initials></Initials>
  <Title></Title>
  <EmployeeNumber></EmployeeNumber>
  <PostalAddress></PostalAddress>
  <PostalCode></PostalCode>
  <City></City>
  <State></State>
  <Country></Country>
  <LDAP_ADsPath></LDAP_ADsPath>
  <CommonName></CommonName>
  <DistinguishedName></DistinguishedName>    
  <ExtendedAttribute1></ExtendedAttribute1>
  <ExtendedAttribute2></ExtendedAttribute2>
  <ExtendedAttribute3></ExtendedAttribute3>
  <ExtendedAttribute4></ExtendedAttribute4>
  <ExtendedAttribute5></ExtendedAttribute5>
  <SystemIdentifier></SystemIdentifier>
  <Manager>
    <Username>username1</Username>
  </Manager>  
  <Groups>
    <Group>
      <Name>Group1</Name>
    </Group>
    <Group>
      <Name>Group2</Name>
    </Group>
  </Groups>
</User>

Sample code:
RuntimeServiceWebService.RuntimeService myRuntimeService = new RuntimeServiceWebService.RuntimeService();
RuntimeServiceWebService.UserHeader myUserHeader = new RuntimeServiceWebService.UserHeader();
myRuntimeService.UserHeaderValue = myUserHeader;

myUserHeader.IgnoreMissingAssociations = ignoreMissingAssociations;

myRuntimeService.UpdateUser(username, userDefinition);

See Also