Fixed: FS#810 - FTP - If username is left blank and client clicks options a clientname_ blank username is created.
| | |
| | | 'username' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'username_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | | 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'username_error_unique'), |
| | | 2 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{1,64}$/', |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{0,64}$/', |
| | | 'errmsg'=> 'username_error_regex'), |
| | | ), |
| | | 'default' => '', |
| | |
| | | 'username' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', |
| | | 'errmsg'=> 'username_error_empty'), |
| | | 1 => array ( 'type' => 'UNIQUE', |
| | | 'validators' => array ( 0 => array ( 'type' => 'UNIQUE', |
| | | 'errmsg'=> 'username_error_unique'), |
| | | 2 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{1,64}$/', |
| | | 1 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^[\w\.\-]{0,64}$/', |
| | | 'errmsg'=> 'username_error_regex'), |
| | | ), |
| | | 'default' => '', |
| | |
| | | // Set a few fixed values |
| | | $this->dataRecord["server_id"] = $parent_domain["server_id"]; |
| | | |
| | | //die(print_r($this->dataRecord)); |
| | | |
| | | if(isset($this->dataRecord['username']) && trim($this->dataRecord['username']) == '') $app->tform->errorMessage .= $app->tform->lng('username_error_empty').'<br />'; |
| | | if(isset($this->dataRecord['username']) && empty($this->dataRecord['parent_domain_id'])) $app->tform->errorMessage .= $app->tform->lng('parent_domain_id_error_empty').'<br />'; |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | |
| | | $wb["uid_error_empty"] = 'GID empty.'; |
| | | $wb["directory_error_empty"] = 'Directory empty.'; |
| | | $wb['directory_error_notinweb'] = 'Directory not inside of web root directory.'; |
| | | $wb["parent_domain_id_error_empty"] = 'No website selected.'; |
| | | ?> |
| | |
| | | $wb["uid_error_empty"] = 'GID empty.'; |
| | | $wb["directory_error_empty"] = 'Directory empty.'; |
| | | $wb["limit_shell_user_txt"] = 'The max number of shell users is reached.'; |
| | | $wb["parent_domain_id_error_empty"] = 'No website selected.'; |
| | | ?> |
| | |
| | | // Set a few fixed values |
| | | $this->dataRecord["server_id"] = $parent_domain["server_id"]; |
| | | |
| | | if(isset($this->dataRecord['username']) && trim($this->dataRecord['username']) == '') $app->tform->errorMessage .= $app->tform->lng('username_error_empty').'<br />'; |
| | | if(isset($this->dataRecord['username']) && empty($this->dataRecord['parent_domain_id'])) $app->tform->errorMessage .= $app->tform->lng('parent_domain_id_error_empty').'<br />'; |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | unset($blacklist); |
| | | |
| | | |
| | | /* |
| | | * If the names should be restricted -> do it! |
| | | */ |