aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-01-08 11:23:52 +0000
committerplegall <plg@piwigo.org>2005-01-08 11:23:52 +0000
commit971d0c5a9593d2a8d8ad0eff70c9dba1ca06a606 (patch)
treeac5ab17972444902a0dfb128eace09f9a11e6b86 /admin/include/functions.php
parentbaf609b26a5c17dbaf5a7f04c9ed95b128b928aa (diff)
- deletion of calculated permissions when deleting a user
- taking into account locked categories during permissions calculation git-svn-id: http://piwigo.org/svn/trunk@680 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index c2c386a78..80f329469 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -321,7 +321,7 @@ DELETE FROM '.IMAGES_TABLE.'
// - all the links to any group
// - all the favorites linked to this user
// - all sessions linked to this user
-// - all categories informations linked to this user
+// - calculated permissions linked to the user
function delete_user($user_id)
{
// destruction of the access linked to the user
@@ -352,6 +352,13 @@ DELETE FROM '.SESSIONS_TABLE.'
;';
pwg_query($query);
+ // deletion of calculated permissions linked to the user
+ $query = '
+DELETE FROM '.USER_FORBIDDEN_TABLE.'
+ WHERE user_id = '.$user_id.'
+;';
+ pwg_query($query);
+
// destruction of the user
$query = '
DELETE FROM '.USERS_TABLE.'