code: public function validateUserData($userData)
      {
          $this->assertRequired($userData, "pwhash");
          $this->assertString($userData, "pwhash");
          
          // All remaining options are optional
          $this->assertString($userData, "email");
          $this->assertArray($userData, "attributes");
          $this->assertString($userData, "encoder");
          $this->assertBool($userData, "pwreset");
          $this->assertArrayOfStrings($userData, "groups");
          $this->assertString($userData, "displayName");
      }
docs: Validates all user parameters
  
  @param array $userData Userdata array
  @throws ConfigurationException On a failed assertation