From bd73ae2b2d6e32feb66d4cf0a86680116a59688f Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 26 Apr 2007 02:01:36 +0000 Subject: merge revision 1978 from trunk to branch-1_7 invalidation of the users cache done in a function and an action is triggered git-svn-id: http://piwigo.org/svn/branches/branch-1_7@1979 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/functions.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'admin') 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'); +} ?> -- cgit v1.2.3