- // TRANS: Client error displayed when trying to handle an unknown API method.
- $this->clientError(_('API method not found.'), $code = 404);
- return;
- }
-
- $profile = $this->user->getProfile();
-
- if (empty($profile)) {
- // TRANS: Client error displayed when requesting user information for a user without a profile.
- $this->clientError(_('User has no profile.'));
- return;
+ // TRANS: Client error displayed when coming across a non-supported API method.
+ $this->clientError(_('API method not found.'), 404);