Only show ban clipboard action for non-banned users
authorMatthias Schmidt <gravatronics@live.com>
Fri, 29 Jul 2016 17:33:42 +0000 (19:33 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 29 Jul 2016 17:33:42 +0000 (19:33 +0200)
wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php

index 32725f05f0eff95637e5908059dc6c495e56f5da..ace1cf20ed49b745bcb5bfaa693e9cc271febf61 100644 (file)
@@ -109,7 +109,14 @@ class UserClipboardAction extends AbstractClipboardAction {
                        return [];
                }
                
-               return $this->__validateAccessibleGroups(array_keys($this->objects));
+               $userIDs = [];
+               foreach ($this->objects as $user) {
+                       if (!$user->banned) {
+                               $userIDs[] = $user->userID;
+                       }
+               }
+               
+               return $this->__validateAccessibleGroups($userIDs);
        }
        
        /**