diff --git a/src/Api/Controller/UpdateUserController.php b/src/Api/Controller/UpdateUserController.php index ae41f182ba..6090e6fca1 100644 --- a/src/Api/Controller/UpdateUserController.php +++ b/src/Api/Controller/UpdateUserController.php @@ -12,7 +12,7 @@ use Flarum\Api\Serializer\CurrentUserSerializer; use Flarum\Api\Serializer\UserSerializer; use Flarum\User\Command\EditUser; -use Flarum\User\Exception\PermissionDeniedException; +use Flarum\User\Exception\NotAuthenticatedException; use Illuminate\Contracts\Bus\Dispatcher; use Illuminate\Support\Arr; use Psr\Http\Message\ServerRequestInterface; @@ -62,7 +62,7 @@ protected function data(ServerRequestInterface $request, Document $document) $password = Arr::get($request->getParsedBody(), 'meta.password'); if (! $actor->checkPassword($password)) { - throw new PermissionDeniedException; + throw new NotAuthenticatedException; } }