Commit b139f7cb authored by Andrew Robert Nicols's avatar Andrew Robert Nicols Committed by Francois Marier
Browse files

optionally force group_user_access to update instead of using static cache


Signed-off-by: default avatarAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Signed-off-by: default avatarFrancois Marier <francois@catalyst.net.nz>
parent 509be6fe
......@@ -40,7 +40,7 @@ defined('INTERNAL') || die();
* @return mixed The role the user has in the group, or false if they
* have no role in the group
*/
function group_user_access($groupid, $userid=null) {
function group_user_access($groupid, $userid=null, $refresh=null) {
static $result;
if (!is_logged_in()) {
......@@ -50,7 +50,7 @@ function group_user_access($groupid, $userid=null) {
$groupid = group_param_groupid($groupid);
$userid = group_param_userid($userid);
if (isset($result[$groupid][$userid])) {
if (isset($result[$groupid][$userid]) && !isset($refresh)) {
return $result[$groupid][$userid];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment