mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Merge remote-tracking branch 'origin/2.5.x'
This commit is contained in:
commit
66b7bdd07c
18 changed files with 614 additions and 472 deletions
|
@ -592,7 +592,7 @@ class ConfigController extends AbstractController
|
|||
/**
|
||||
* Delete account for current user.
|
||||
*
|
||||
* @Route("/account/delete", name="delete_account")
|
||||
* @Route("/account/delete", name="delete_account", methods={"POST"})
|
||||
*
|
||||
* @throws AccessDeniedHttpException
|
||||
*
|
||||
|
@ -600,6 +600,10 @@ class ConfigController extends AbstractController
|
|||
*/
|
||||
public function deleteAccountAction(Request $request, UserRepository $userRepository, TokenStorageInterface $tokenStorage)
|
||||
{
|
||||
if (!$this->isCsrfTokenValid('delete-account', $request->request->get('token'))) {
|
||||
throw $this->createAccessDeniedException('Bad CSRF token.');
|
||||
}
|
||||
|
||||
$enabledUsers = $userRepository->getSumEnabledUsers();
|
||||
|
||||
if ($enabledUsers <= 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue