Add enabling/disabling account deletion

This commit is contained in:
osaajani 2020-06-24 18:55:03 +02:00
parent 6216ff63bb
commit 2f26f0a7cd
3 changed files with 28 additions and 18 deletions

View file

@ -156,6 +156,13 @@ namespace controllers\publics;
*/
public function delete($csrf)
{
if (!ENABLE_ACCOUNT_DELETION)
{
\FlashMessage\FlashMessage::push('danger', 'Fonctionnalité désactivée.');
return $this->redirect(\descartes\Router::url('Account', 'show'));
}
if (!$this->verify_csrf($csrf))
{
\FlashMessage\FlashMessage::push('danger', 'Jeton CSRF invalid !');