`false` otherwise * @apiSuccess {String} name The user's name * @apiSuccess {String} email The user's email address * @apiSuccess {String} signature The user's signature, in plaintext * @apiSuccess {Unknown} language ??? (Unknown) * @apiSuccess {String[]} categories Ticket categories the user has access to. If the user is an admin, this list has one element: "" * @apiSuccess {Integer} afterReply Action to perform after replying to a ticket:
* `0` - Show the ticket I just replied to
* `1` - Return to the main administration page
* `2` - Open next ticket that needs my reply * @apiSuccess {Boolean} autoStart Automatically start timer when the user opens a ticket * @apiSuccess {Boolean} notifyCustomerNew Select notify customer option in the new ticket form * @apiSuccess {Boolean} notifyCustomerReply Select notify customer option in the ticket reply form * @apiSuccess {Boolean} showSuggested Show what knowledgebase articles were suggested to customers * @apiSuccess {Boolean} notifyNewUnassigned Notify the user when a new ticket is submitted with owner: Unassigned * @apiSuccess {Boolean} notifyNewMy Notify the user when a new ticket is submitted and is assigned to the user * @apiSuccess {Boolean} notifyAssigned Notify the user when a ticket is assigned to the user * @apiSuccess {Boolean} notifyReplyUnassigned Notify the user when the client responds to a ticket with owner: Unassigned * @apiSuccess {Boolean} notifyReplyMy Notify the user when the client responds to a ticket assigned to the user * @apiSuccess {Boolean} notifyPm Notify the user when a private message is sent to the user * @apiSuccess {Boolean} notifyNoteUnassigned Notify the user when someone adds a note to a ticket not assigned to the user * @apiSuccess {Unknown} defaultList ??? (Currently unknown) * @apiSuccess {Boolean} autoassign Tickets are auto-assigned to this user * @apiSuccess {String[]} heskPrivileges Helpdesk features the user has access to. If the user is an admin, this list has one element: "" * @apiSuccess {Integer} ratingNeg Total number of negative feedback to "Was this reply helpful?" on replies by this user * @apiSuccess {Integer} ratingPos Total number of positive feedback to "Was this reply helpful?" on replies by this user * @apiSuccess {String} rating The overall rating of the user, as a floating point decimal * @apiSuccess {Integer} autorefresh The ticket table autorefresh time for the user, in milliseconds * @apiSuccess {Boolean} active `true` if the user is active
`false` otherwise * * @apiSuccessExample {json} Success-Response: * HTTP/1.1 200 OK * { * "id": 1, * "username": "mkoch", * "admin": true, * "name": "Your name", * "email": "mkoch227@gmail.com", * "signature": "Sincerely,\r\n\r\nYour name\r\nYour website\r\nhttp://www.yourwebsite.com\r\n& < > ^ &", * "language": null, * "categories": [ * "" * ], * "afterReply": 0, * "autoStart": true, * "notifyCustomerNew": true, * "notifyCustomerReply": true, * "showSuggested": true, * "notifyNewUnassigned": true, * "notifyNewMy": true, * "notifyReplyUnassigned": true, * "notifyReplyMy": true, * "notifyAssigned": true, * "notifyPm": false, * "notifyNote": true, * "notifyNoteUnassigned": false, * "defaultList": "", * "autoassign": true, * "heskPrivileges": [ * "" * ], * "ratingNeg": 0, * "ratingPos": 0, * "rating": "0", * "autorefresh": 0, * "active": true * } * * @apiError (noTokenProvided) 400 No `X-Auth-Token` was provided where it is required * @apiError (invalidXAuthToken) 401 The `X-Auth-Token` provided was invalid */ if ($request_method == 'GET') { $token = get_header('X-Auth-Token'); try { get_user_for_token($token, $hesk_settings); } catch (AccessException $e) { return http_response_code($e->getCode()); } if (isset($_GET['id'])) { $results = retrieve_user($hesk_settings, $_GET['id']); } else { $results = retrieve_user($hesk_settings); } if ($results == NULL) { return http_response_code(404); } return output($results); } return http_response_code(405);