File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,9 @@ public function exists($ignorecache = false)
66
66
{
67
67
if (!$ ignorecache ) {
68
68
$ cached_pi_groups = $ this ->REDIS ->getCache ("sorted_pi_groups " , "" );
69
- return in_array ($ this ->getPIUID (), $ cached_pi_groups );
69
+ if (!is_null ($ cached_pi_groups )) {
70
+ return in_array ($ this ->getPIUID (), $ cached_pi_groups );
71
+ }
70
72
}
71
73
return $ this ->getLDAPPiGroup ()->exists ();
72
74
}
Original file line number Diff line number Diff line change @@ -157,9 +157,9 @@ public function getLDAPGroup()
157
157
public function exists ($ ignorecache = false )
158
158
{
159
159
if (!$ ignorecache ) {
160
- $ cached_val = $ this ->REDIS ->getCache ($ this -> uid , "cn " );
161
- if (!is_null ($ cached_val )) {
162
- return true ;
160
+ $ cached_users = $ this ->REDIS ->getCache (" sorted_users " , "" );
161
+ if (!is_null ($ cached_users )) {
162
+ return in_array ( $ this -> getPIUID (), $ cached_users ) ;
163
163
}
164
164
}
165
165
return $ this ->getLDAPUser ()->exists () && $ this ->getLDAPGroup ()->exists ();
You can’t perform that action at this time.
0 commit comments