mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 05:55:16 +01:00
Fixed PHPstan issues
This commit is contained in:
@@ -411,6 +411,9 @@ class UserSettingsController extends AbstractController
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
|
||||
$token = new ApiToken();
|
||||
if (!$this->getUser() instanceof User) {
|
||||
throw new RuntimeException('This controller only works only for Part-DB User objects!');
|
||||
}
|
||||
$token->setUser($this->getUser());
|
||||
|
||||
$secret = null;
|
||||
|
||||
Reference in New Issue
Block a user