aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2006-07-21 15:30:13 +0000
committernikrou <nikrou@piwigo.org>2006-07-21 15:30:13 +0000
commitdebab363b61d972c3043844d3a51440800ff8103 (patch)
treee8b4db8d9344ab29e8a06fa15684650af7b910eb
parentfdc7bdbd3b16d02ffc8d216cbe4696955edecf6e (diff)
bug 482 fixed: deletion of our account must be impossible
svn merge from trunk into branch 1.6 git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1490 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/user_list.php5
-rw-r--r--language/en_UK.iso-8859-1/admin.lang.php1
-rw-r--r--language/fr_FR.iso-8859-1/admin.lang.php1
3 files changed, 6 insertions, 1 deletions
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'])
diff --git a/language/en_UK.iso-8859-1/admin.lang.php b/language/en_UK.iso-8859-1/admin.lang.php
index 35dc7dd0b..ce2a743c0 100644
--- a/language/en_UK.iso-8859-1/admin.lang.php
+++ b/language/en_UK.iso-8859-1/admin.lang.php
@@ -177,6 +177,7 @@ $lang['Webmaster cannot be deleted'] = 'Webmaster cannot be deleted';
$lang['Yes'] = 'Yes';
$lang['You are running on development sources, no check possible.'] = 'You are running on development sources, no check possible.';
$lang['You are running the latest version of PhpWebGallery.'] = 'You are running the latest version of PhpWebGallery.';
+$lang['You cannot delete your account'] = "You cannot delete your account";
$lang['You cannot move a category in its own sub category'] = 'You cannot move a category in its own sub category';
$lang['You need to confirm deletion'] = 'You need to confirm deletion';
$lang['actions'] = 'Actions';
diff --git a/language/fr_FR.iso-8859-1/admin.lang.php b/language/fr_FR.iso-8859-1/admin.lang.php
index 06b19f41a..1e0516bca 100644
--- a/language/fr_FR.iso-8859-1/admin.lang.php
+++ b/language/fr_FR.iso-8859-1/admin.lang.php
@@ -177,6 +177,7 @@ $lang['Webmaster cannot be deleted'] = 'Le webmestre ne peut pas être supprimé';
$lang['Yes'] = 'Oui';
$lang['You are running on development sources, no check possible.'] = 'Vous travaillez avec les sources de développement, impossible de vérifier la dernière version.';
$lang['You are running the latest version of PhpWebGallery.'] = 'Vous utilisez la dernière version de PhpWebGallery.';
+$lang['You cannot delete your account'] = "Vous ne pouvez pas supprimer votre compte";
$lang['You cannot move a category in its own sub category'] = 'Vous ne pouvez pas déplacer une catégorie dans sa propre sous-catégorie';
$lang['You need to confirm deletion'] = 'Vous devez confirmer la suppression';
$lang['actions'] = 'Actions';