File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 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)
6666 {
6767 if (!$ ignorecache ) {
6868 $ 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+ }
7072 }
7173 return $ this ->getLDAPPiGroup ()->exists ();
7274 }
Original file line number Diff line number Diff line change @@ -157,9 +157,9 @@ public function getLDAPGroup()
157157 public function exists ($ ignorecache = false )
158158 {
159159 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 ) ;
163163 }
164164 }
165165 return $ this ->getLDAPUser ()->exists () && $ this ->getLDAPGroup ()->exists ();
You can’t perform that action at this time.
0 commit comments