X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapichecknickname.php;h=a950dee135dfc72f039edb505af6e8fcbd455f07;hb=b53e1439969bfa2c0b551d8cc2fc8fe15652c62a;hp=73063c61b7334c66a1f699859343d434576d0f93;hpb=220b51d8be61e9bd316567f3ad03fffdbc4b7526;p=quix0rs-gnu-social.git diff --git a/actions/apichecknickname.php b/actions/apichecknickname.php index 73063c61b7..a950dee135 100644 --- a/actions/apichecknickname.php +++ b/actions/apichecknickname.php @@ -5,7 +5,7 @@ * * Check nickname * - * Returns 1 if nickname is ok, 0 if not + * Returns 1 if nickname is available on this instance, 0 if not. Error if site is private. * * PHP version 5 * @@ -38,6 +38,10 @@ class ApiCheckNicknameAction extends ApiAction { parent::prepare($args); + if (common_config('site', 'private')) { + $this->clientError(_('This site is private.'), 403); + } + if ($this->format !== 'json') { $this->clientError('This method currently only serves JSON.', 415); }