From 88273a930b0d36fb17ba64b5db6ff1052df5da89 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 15 Nov 2011 03:58:16 -0500 Subject: [PATCH] - Added code to preserve permissions of invoices folder in the installer. - Fixed a problem with german umlauts in monitor. - Added code to update.php and autoupdate.php that checks the mysql root password before the update starts. - Fixed: FS#1848 - changing password of ssh user >>> rights in webXX are changed --- interface/lib/classes/validate_client.inc.php | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/validate_client.inc.php b/interface/lib/classes/validate_client.inc.php index 1124d72..97b9221 100644 --- a/interface/lib/classes/validate_client.inc.php +++ b/interface/lib/classes/validate_client.inc.php @@ -36,7 +36,13 @@ function username_unique($field_name, $field_value, $validator) { global $app; - if($app->tform->primary_id == 0) { + if(isset($app->remoting_lib->primary_id)) { + $client_id = $app->remoting_lib->primary_id; + } else { + $client_id = $app->tform->primary_id; + } + + if($client_id == 0) { $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = '".$app->db->quote($field_value)."'"); if($num_rec["number"] > 0) { $errmsg = $validator['errmsg']; @@ -47,7 +53,7 @@ } } } else { - $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = '".$app->db->quote($field_value)."' AND client_id != ".$app->tform->primary_id); + $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM sys_user WHERE username = '".$app->db->quote($field_value)."' AND client_id != ".$client_id); if($num_rec["number"] > 0) { $errmsg = $validator['errmsg']; if(isset($app->tform->wordbook[$errmsg])) { -- Gitblit v1.9.1