mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Add enabling/disabling account deletion
This commit is contained in:
parent
6216ff63bb
commit
2f26f0a7cd
3 changed files with 28 additions and 18 deletions
|
@ -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 !');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue