code: public function checkUser($username = null)
      {
          if ($username === null) {
              $username = $this->user;
          }
  
          if (strlen($username) == 0) {
              return true;
          }
  
          $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/";
          $status = @preg_match($pattern, $username);
  
          if ($status === false) {
              throw new Ts3Exception("URI username validation failed");
          }
  
          return ($status == 1);
      }
docs: Returns TRUE if the username is valid.
  
  @param  string $username
  @throws Ts3Exception
  @return boolean