user.find

The user.find command is used to retrieve a user by email address. It returns more appropriate information depending on the permission of the user executing the command.

TR50 Request

{
  "cmd": {
    "command": "user.find",
    "params": {
      "emailAddress": "user@example.com"
    }
  }
}

Request Parameters

Name Type Required Description
emailAddress String Yes The email address of the user.
profile_key String   User profile key to return. When provided, the requested profile is appended to the result.

TR50 Response

If the command is sent successfully a success message and the user is returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true,
    "params": {
      "id": "52a1d3db169e1fd03217940d",
      "emailAddress": "user@example.com",
      "defaultOrgId": "fd03217940d52a1d3db169e1",
      "firstName": "Jane",
      "lastName": "Smith",
      "company": "Acme",
      "title": "CEO",
      "officePhone": "5558675309",
      "mobilePhone": "5558675309",
      "isSuperAdmin": false,
      "isSuperOps": false,
      "createdBy": "SYSTEM",
      "createdOn": "2013-12-06T08:40:43.885-05:00",
      "updatedBy": "SYSYEM",
      "updatedOn": "2013-12-06T08:40:43.885-05:00",
      "locked": true,
      "mustResetPassword": true
    }
  }
}

Response parameters

Name Type Description
id String The object id of the user.
emailAddress String The email address of the user.
password String The password of the user.
defaultOrgId String The object id of the default org the user is associated to.
firstName String The first name of the user.
lastName String The last name of the user.
company String The name of the company the user belongs to.
title String The title the user holds within the company.
officePhone String The office phone number of the user.
mobilePhone String The mobile phone number of the user.
isSuperAdmin Boolean If the user has super admin permission.
isSuperOps Boolean If the the user has super ops permission.
support Boolean Whether the user has access to the support system.
data Object Opaque data store object.
lastLoginOn Timestamp The date and time of the user's last login.
createdBy String The email address of the user who created the user.
createdOn Timestamp The date and time that the user was created.
updatedBy String The email address of the user who last updated the user.
updatedOn Timestamp The date and time that the user was updated.
locked Boolean This flag will be set to true if the user account is locked.
mustResetPassword Boolean This flag will be set to true if the user must change their password before their next authentication.
profile Object The user profile object.

PHP API

mixed TR50httpWorker::userFind($emailAddress);