aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-04-26 01:59:39 +0000
committerrvelices <rv-github@modusoptimus.com>2007-04-26 01:59:39 +0000
commit3ac503a15bd40381f39556e5259867c88c2b7932 (patch)
treeb56071870f627f0a95885651d9b8aa19bf5ecdd2 /admin/include
parentb76b07bcb68cb0d491b9ac482d591f1467973ec2 (diff)
invalidation of the users cache done in a function and an action is triggered
git-svn-id: http://piwigo.org/svn/trunk@1978 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 6e97e3908..66deb5777 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -2013,4 +2013,16 @@ function pwg_URL()
return $urls;
}
+/**
+ * Invalidates cahed data (permissions and category counts) for all users.
+ */
+function invalidate_user_cache()
+{
+ $query = '
+UPDATE '.USER_CACHE_TABLE.'
+ SET need_update = \'true\'
+;';
+ pwg_query($query);
+ trigger_action('invalidate_user_cache');
+}
?>