/** * @api {get} /users/{username} Get User Info * @apiGroup Users * @apiDescription Get a user's account information. * @apiParam {string} [sessionKey] If a valid sessionKey for this user is given additional information is returned. * @apiSuccessExample {json} Success Response * { * "user": { * "createdAt": "2010-05-14 12:39:00", * "id": 1, * "username": "******" * } * } * @apiSuccessExample {json} Success Response With sessionKey * { * "user": { * "createdAt": "2010-05-14 12:39:00", * "defaultPrivacy": 0, * "email": "*****@*****.**", * "id": 1, * "moderator": true, * "updatedAt": "2015-11-23 00:48:02", * "url": "http://ctrlv.in/user/anthony", * "username": "******" * } * } * * @param User $user * * @return Response */ public function show(User $user) { $user->load('albums'); // TODO: Album privacy check return $this->response(['user' => $user]); }