diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-12-24 12:04:27 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-12-24 12:04:27 +0100 |
commit | 055bbcbd61a56e39408e7d2b9d83c47fc76daa20 (patch) | |
tree | 3d3ced3c3147346e382a9ca53a499fd35f21749a /app/view/templates | |
parent | 8d8f625ea20e10cf6fb053fab73c2ef7a559dc87 (diff) | |
download | wcms-055bbcbd61a56e39408e7d2b9d83c47fc76daa20.tar.gz wcms-055bbcbd61a56e39408e7d2b9d83c47fc76daa20.zip |
user admin protection
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/userconfirmdelete.php | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/app/view/templates/userconfirmdelete.php b/app/view/templates/userconfirmdelete.php index 342775f..069f5de 100644 --- a/app/view/templates/userconfirmdelete.php +++ b/app/view/templates/userconfirmdelete.php @@ -1,17 +1,42 @@ +<?php +if($candelete) { + ?> -<h1>Delete User</h1> -<h2>Id : <?= $userdelete->id() ?></h2> -<h2>Level : <?= $userdelete->level() ?></h2> + <h1>Delete User</h1> + <h2>Id : <?= $userdelete->id() ?></h2> + <h2>Level : <?= $userdelete->level() ?></h2> -<form action="<?= $this->url('userupdate') ?>" method="post"> -<input type="hidden" name="id" value="<?= $userdelete->id() ?>"> + <form action="<?= $this->url('userupdate') ?>" method="post"> -<input type="submit" name="action" value="confirmdelete"> + <input type="hidden" name="id" value="<?= $userdelete->id() ?>"> + <input type="submit" name="action" value="confirmdelete"> -</form>
\ No newline at end of file + + </form> + + + + + + <?php +} else { + ?> + + <h1>You can't delete this user</h1> + + <h2>You need at least one admin user to run the system.</h2> + + <p>To delete this user, create at least another admin user, then retry to delete this one.</p> + + <a href="<?= $this->url('user') ?>">Go back to users</a> + + + <?php +} +?>
\ No newline at end of file |