Methods > glpi.listUsers

This method is only accessible by authenticated users

Version Comments
1.3.0 email field contains the user default email
1.2.0 add entity, parent, order options, add locations_id in result
0.2.0 Method added

List the Users with right on the current entites

input hashtable of optional criteria

  • count , start, limit (optional)
  • help option to get usage information
  • user : an optional user ID (result will return a single object if found)
  • group : an optional group ID
  • location : an optional location ID
  • login : an optional string (MySQL joker % allowed)
  • name : an optional string (MySQL joker % allowed)
  • entity : ID of the entity to search for allowed user (optional)
  • parent : search or not for user with recursive right on parent entities (optional, default: true)
  • order : of the result, must be in 'id', 'name', 'login' (optional, default: 'id')
return a array of hastable
  • id of the user
  • name of the user (login)
  • firstname
  • realname
  • email user default email address
  • phone number
  • locations_id
  • locations_name
  • displayname according to GLPI configuration

Call example

$ php testxmlrpc.php --session=3u1olttlifhqs6g9f64bmc34c0 --method=glpi.listUsers --group=311
+ Calling 'glpi.listUsers' on http://localhost//glpi080/plugins/webservices/xmlrpc.php?session=3u1olttlifhqs6g9f64bmc34c0
+ Response: Array
(
    [0] => Array
        (
            [id] => 1699
            [name] => user123
            [firstname] => Roger
            [realname] => SMITH
            [email] => roger.smith@foo.com
            [phone] => 12 34 56 78
            [locations_id] => 123
            [locations_name] => New-York
            [displayname] => Roger SMITH
        )
    [1] => Array
        (
            [id] => 1700
            [name] => user456
            [firstname] => Remi
            [realname] => Collet
            [email] => remi.collet@foo.com
            [phone] => 12 34 56 78
            [locations_id] => 321
            [locations_name] => France
            [displayname] => Remi COLLET
        )
)