From a15839b18305b53d9767dd58ae03b1e6d690ac67 Mon Sep 17 00:00:00 2001 From: nikrou Date: Fri, 21 Jul 2006 15:28:09 +0000 Subject: bug 482 fixed: deletion of our account must be impossible git-svn-id: http://piwigo.org/svn/trunk@1489 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/user_list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'admin/user_list.php') diff --git a/admin/user_list.php b/admin/user_list.php index 79cf5af98..c1e6fac2c 100644 --- a/admin/user_list.php +++ b/admin/user_list.php @@ -250,13 +250,16 @@ if (isset($_POST['delete']) or isset($_POST['pref_submit'])) // +-----------------------------------------------------------------------+ // | delete users | // +-----------------------------------------------------------------------+ - if (isset($_POST['delete']) and count($collection) > 0) { if (in_array($conf['webmaster_id'], $collection)) { array_push($page['errors'], l10n('Webmaster cannot be deleted')); } + elseif (in_array($user['id'], $collection)) + { + array_push($page['errors'], l10n('You cannot delete your account')); + } else { if (isset($_POST['confirm_deletion']) and 1 == $_POST['confirm_deletion']) -- cgit v1.2.3