Methods > glpi.getMyInfo

This method is only accessible by authenticated users

Version Comments
1.3.0 output contains new fields, and 'emails' array
1.2.0 Output contains new fields, id2name option added
0.2.0 Method added

List the information about the authenticated user

input a hastable of option

  • help option to get usage information
  • id2name : option to enable id to name translation of dropdown fields

return a hashtable

  • fields of glpi_users table
  • email : default user email (no more a glpi_users field in 0.83)
  • emails : array of all user email addresses

Call example GLPI 0.83

$ php testxmlrpc.php --session=4psj527hltvempeo3usfjlm4c0 --method=glpi.getMyInfo --id2name
+ Calling 'glpi.getMyInfo' on http://localhost//glpi080/plugins/webservices/xmlrpc.php?session=4psj527hltvempeo3usfjlm4c0
+ Response: Array
(
    [id] => 6
    [name] => remi
...
    [password_forget_token_date] => 
    [email] => remi@example.fr
    [emails] => Array
        (
            [0] => remi@example.fr
            [1] => remi@example.com
        )
)

Call example GLPI 0.80.1

$ php testxmlrpc.php --session=4psj527hltvempeo3usfjlm4c0 --method=glpi.getMyInfo --id2name
+ Calling 'glpi.getMyInfo' on http://localhost//glpi080/plugins/webservices/xmlrpc.php?session=4psj527hltvempeo3usfjlm4c0
+ Response: Array
(
    [id] => 6
    [name] => remi
    [password] => 
    [email] => remi@foo.com
    [phone] => 12 34 56 78 90
    [phone2] =>
    [mobile] => 
    [realname] => COLLET
    [firstname] => REMI
    [language] => 
    [use_mode] => 2
    [list_limit] => 20
    [comment] => 
    [auths_id] => 1
    [authtype] => 3
    [last_login] => 2011-07-04 07:54:40
    [date_mod] => 2011-05-24 13:34:56
    [date_sync] => 2011-07-04 07:54:40
    [is_deleted] => 0
    [locations_id] => 4606
    [is_active] => 1
    [profiles_id] => 4
    [entities_id] => 1
    [usertitles_id] => 0
    [usercategories_id] => 0
    [date_format] => 
    [number_format] => 
    [names_format] => 
    [csv_delimiter] => 
    [is_ids_visible] => 
    [dropdown_chars_limit] => 35
    [use_flat_dropdowntree] => 
    [show_jobs_at_login] => 
    [priority_1] => 
    [priority_2] => 
    [priority_3] => 
    [priority_4] => 
    [priority_5] => 
    [priority_6] => 
    [is_categorized_soft_expanded] => 0
    [is_not_categorized_soft_expanded] => 0
    [followup_private] => 
    [task_private] => 1
    [default_requesttypes_id] => 
    [token] => 
    [tokendate] => 
    [user_dn] => uid=remi,ou=Comptes,dc=foor,dc=com
    [registration_number] => 1234
    [locations_name] => France > Reims
    [usertitles_name] => 
    [usercategories_name] => 
    [default_requesttypes_name] => Helpdesk
)

GLPI 0.72

$ php testxmlrpc.php --session=k6729g89bgnb0r7dg2bcvahqr2 --method=glpi.getMyInfo
+ Calling 'glpi.getMyInfo' on http://localhost//glpi072/plugins/webservices/xmlrpc.php?session=k6729g89bgnb0r7dg2bcvahqr2
+ Response: Array
(
    [id] => 6
    [name] => glpi
    [realname] => COLLET
    [firstname] => Remi
    [email] => remi@foo.com
    [phone] => 12 34 56 78 90
    [phone2] => 
    [language] => fr_FR
    [comment] => 
    [last_login] => 2009-08-25 08:42:11
    [date_mod] => 2009-08-11 08:37:49
    [userstitles_id] => 0
    [userscategories_id] => 0
)