if(isset($this->backends[$prefix])) {
$result = call_user_func_array(array($this->backends[$prefix], $method), $parameters);
if(!$result) {
- //not found here, reset cache to null
- $this->writeToCache($cacheKey, null);
+ //not found here, reset cache to null if group vanished
+ //because sometimes methods return false with a reason
+ $groupExists = call_user_func_array(
+ array($this->backends[$prefix], 'groupExists'),
+ array($gid)
+ );
+ if(!$groupExists) {
+ $this->writeToCache($cacheKey, null);
+ }
}
return $result;
}
if(isset($this->backends[$prefix])) {
$result = call_user_func_array(array($this->backends[$prefix], $method), $parameters);
if(!$result) {
- //not found here, reset cache to null
- $this->writeToCache($cacheKey, null);
+ //not found here, reset cache to null if user vanished
+ //because sometimes methods return false with a reason
+ $userExists = call_user_func_array(
+ array($this->backends[$prefix], 'userExists'),
+ array($uid)
+ );
+ if(!$userExists) {
+ $this->writeToCache($cacheKey, null);
+ }
}
return $result;
}