Fixed search for group members
authorMarcel Werk <burntime@woltlab.com>
Sun, 2 Jun 2013 15:14:55 +0000 (17:14 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 2 Jun 2013 15:14:55 +0000 (17:14 +0200)
wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php

index 10ac7843060e1e317c5200a569888c284c6c2627..2541c16c27d2a17c9e5a70cc418403cb8686726a 100755 (executable)
@@ -167,6 +167,28 @@ class UserSearchForm extends UserOptionListForm {
         */
        public $maxResults = 0;
        
+       /**
+        * @see wcf\page\IPage::readParameters()
+        */
+       public function readParameters() {
+               parent::readParameters();
+       
+               // search user from passed groupID by group-view
+               if (isset($_GET['groupID'])) {
+                       $this->groupIDs[] = intval($_GET['groupID']);
+                               
+                       // do search
+                       try {
+                               $this->validate();
+                               $this->save();
+                       }
+                       catch (UserInputException $e) {
+                               $this->errorField = $e->getField();
+                               $this->errorType = $e->getType();
+                       }
+               }
+       }
+       
        /**
         * @see wcf\form\IForm::readFormParameters()
         */