/**
  * @api {post} /admin/users/search/:id POST /users/search/:id
  * @apiExample Example usage:
  * curl -H "X-COMPARE-REST-API-KEY: 1234567890" 
  *      -i -X POST "http://apibeta.compargo.com/v1/admin/users/c6bcb740-1dcc-11e4-b32d-eff91066cccf/?countryCode=ph&language=en"
  * @apiDescription Read data of a User
  * @apiName SearchUser
  * @apiGroup Users
  * 
  * @apiHeader  {String} X-COMPARE-REST-API-KEY   Users unique access-key.
  * 
  * @apiParam   {String} language                 Mandatory Language.
  * @apiParam   {String} countryCode              Mandatory Country Code.
  * @apiParam   {Number} id                       Mandatory Users unique ID.
  * 
  * @apiSuccess {Number} id                       ID of the User.
  * @apiSuccess {Number} groupId                  ID of the Group. 
  * @apiSuccess {String} emailAddress             Email Address of the User.
  * @apiSuccess {String} firstName                Firstname of the User.
  * @apiSuccess {String} lastName                 Lastname of the User.
  * @apiSuccess {String} password                 Password of the User.
  * @apiSuccess {String} status                   Status of the User.
  * @apiSuccess {String} active                   Flag of the User.
  * @apiSuccess {String} created                  Creation date of the User.
  * @apiSuccess {String} modified                 Modification date of the User.
  *
  * @apiSuccessExample Success-Response:
  *     HTTP/1.1 200 OK
  *     {
  *       "id": "a8838d12-1dcc-11e4-b32d-eff91066cccf",
  *       "groupId": "56c4b6c2-1d54-11e4-b32d-eff91066cccf",
  *       "emailAddress": "*****@*****.**",
  *       "firstName": "John",
  *       "lastName": "Doe",
  *       "status": 1,
  *       "active": 1,
  *       "created": "2014-07-11 09:13:27",
  *       "modified": "2014-07-11 09:52:08",
  *       "createdBy": "a8838d12-1dcc-11e4-b32d-eff91066cccf",
  *       "modifiedBy": "a8838d12-1dcc-11e4-b32d-eff91066cccf"
  *     }
  *     
  * @apiError UserNotFound The id of the User was not found.
  *
  * @apiErrorExample Error-Response:
  *     HTTP/1.1 404 Not Found
  *     {
  *       "error": "UserNotFound"
  *     }
  *     
  * @apiError InvalidAccessToken The access token is invalid.
  *
  * @apiErrorExample Error-Response:
  *     HTTP/1.1 401 Unauthorized
  *     {
  *       "error": "InvalidAccessToken"
  *     }	 
  *     
  * @apiError MissingAuthenticationCredentials The authentication credentials are missing.
  *
  * @apiErrorExample Error-Response:
  *     HTTP/1.1 401 Unauthorized
  *     {
  *       "error": "MissingAuthenticationCredentials"
  *     }     
  *     
  * @apiError RouteNotFound That route was not found on the server.
  *
  * @apiErrorExample Error-Response:
  *     HTTP/1.1 404 
  *     {
  *       "error": "RouteNotFound"
  *     } 
  */
 public function searchOne($id)
 {
     $results = array();
     $request = $this->di->get('request');
     $parameters = $request->get();
     if (isset($parameters['query'])) {
         $user = new Users();
         $results = $this->respond($user, $id);
     } else {
         $results = Users::findFirstById($id);
     }
     return $results;
 }