Single Sign On: users.createUser

Description

Create a new user on the SWL platform. This is part of the SWL SSO offering.

Required parameters for all SSO calls

  • timestamp : The UNIX timestamp for the current time.
  • hash : A MD5 hash containing, in this order, the SSO secret provided at configuration time, the user ID of the specified user, a MD5 hash of the password of the specified user, and the UNIX timestamp.

Additional required parameters for this call

  • email_address : the email address for the user (must be unique)
  • first_name : the first name of the user (required only if using first/last name)
  • last_name : the last name of the user (required only if using first/last name)
  • username : the username of the user (required only if using usernames)
  • password : the password for the user

Optional parameters

  • user_id : user ID of the specified user (integer)
  • tier : user type identifier (integer)
  • userinfo : An XML blob of additional user fields. The XML must contain the root node "fields" and must contain 1 or more "field" elements. Each element must have an attribute "field_id" which matches the given field_id found in the users.getProfileBlock call, and each field must contain one child CDATA element specifying the value for that field. Example:
    <?xml version="1.0"?>
    <fields>
       <field field_id="1">
           <![CDATA[value1]]>
       </field>
       <field field_id="2">
           <![CDATA[value2]]>
       </field>
    </fields>
  • sendmessage : if set to "y", send the newly created user a welcome message

Example response

<?xml version="1.0"?>
<response status="ok" time="Mon, 25 May 2009 20:20:49 -0500" p="0.068033933639526">
   <createUser count="1"><sso_createUser/></createUser>
</response>

Any failure is returned with the status of "failure" as described in Handling the response.