Add enabling/disabling account deletion
This commit is contained in:
parent
6216ff63bb
commit
2f26f0a7cd
|
@ -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 !');
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
'PWD_PID' => '/var/run/raspisms',
|
||||
'APP_SECRET' => '%APP_SECRET%',
|
||||
'ENABLE_COMMAND' => false,
|
||||
'ENABLE_ACCOUNT_DELETION' => true,
|
||||
|
||||
//E-mail types
|
||||
'EMAIL_RESET_PASSWORD' => [
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (ENABLE_ACCOUNT_DELETION) { ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title"><i class="fa fa-trash-o fa-fw"></i> Supprimer ce compte</h4>
|
||||
|
@ -78,6 +79,7 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<div class="panel panel-default">
|
||||
|
|
Loading…
Reference in New Issue