| @@ 81-91 (lines=11) @@ | ||
| 78 | if(!is_null($prefix)) { |
|
| 79 | if(isset($this->backends[$prefix])) { |
|
| 80 | $result = call_user_func_array(array($this->backends[$prefix], $method), $parameters); |
|
| 81 | if($result === $passOnWhen) { |
|
| 82 | //not found here, reset cache to null if group vanished |
|
| 83 | //because sometimes methods return false with a reason |
|
| 84 | $groupExists = call_user_func_array( |
|
| 85 | array($this->backends[$prefix], 'groupExists'), |
|
| 86 | array($gid) |
|
| 87 | ); |
|
| 88 | if(!$groupExists) { |
|
| 89 | $this->writeToCache($cacheKey, null); |
|
| 90 | } |
|
| 91 | } |
|
| 92 | return $result; |
|
| 93 | } |
|
| 94 | } |
|
| @@ 97-107 (lines=11) @@ | ||
| 94 | $instance = $this->getAccess($prefix); |
|
| 95 | } |
|
| 96 | $result = call_user_func_array(array($instance, $method), $parameters); |
|
| 97 | if($result === $passOnWhen) { |
|
| 98 | //not found here, reset cache to null if user vanished |
|
| 99 | //because sometimes methods return false with a reason |
|
| 100 | $userExists = call_user_func_array( |
|
| 101 | array($this->backends[$prefix], 'userExists'), |
|
| 102 | array($uid) |
|
| 103 | ); |
|
| 104 | if(!$userExists) { |
|
| 105 | $this->writeToCache($cacheKey, null); |
|
| 106 | } |
|
| 107 | } |
|
| 108 | return $result; |
|
| 109 | } |
|
| 110 | } |
|