From 477d4e981a4171dcc8b7886b2130abbee0442067 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 24 May 2012 07:26:50 -0400
Subject: [PATCH] Initial commit of the interface part of the APS installer.
---
interface/lib/classes/validate_client.inc.php | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/interface/lib/classes/validate_client.inc.php b/interface/lib/classes/validate_client.inc.php
index 97b9221..9b0546a 100644
--- a/interface/lib/classes/validate_client.inc.php
+++ b/interface/lib/classes/validate_client.inc.php
@@ -65,6 +65,36 @@
}
}
+ function username_collision($field_name, $field_value, $validator) {
+ global $app;
+
+ if(isset($app->remoting_lib->primary_id)) {
+ $client_id = $app->remoting_lib->primary_id;
+ } else {
+ $client_id = $app->tform->primary_id;
+ }
+
+ $app->uses('getconf');
+ $global_config = $app->getconf->get_global_config('sites');
+
+ if((trim($field_value) == 'web' || preg_match('/^web[0-9]/',$field_value)) &&
+ ($global_config['ftpuser_prefix'] == '[CLIENTNAME]' ||
+ $global_config['ftpuser_prefix'] == '' ||
+ $global_config['shelluser_prefix'] == '[CLIENTNAME]' ||
+ $global_config['shelluser_prefix'] == '' )) {
+ $errmsg = $validator['errmsg'];
+ if(isset($app->tform->wordbook[$errmsg])) {
+ return $app->tform->wordbook[$errmsg]."<br>\r\n";
+ } else {
+ return $errmsg."<br>\r\n";
+ }
+ }
+
+
+
+
+ }
+
--
Gitblit v1.9.1