From 3560c8d8e14e5ddc8a619844d9ab86d3b9d8d52e Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Wed, 06 Jul 2016 10:29:10 -0400
Subject: [PATCH] Fixed issue in SQL lib.
---
interface/web/client/client_edit.php | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index d9afd57..c3cc7f1 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -206,7 +206,7 @@
if($reseller['customer_no_template'] != '') {
//* Set customer no default
$customer_no = $app->functions->intval($reseller['customer_no_start']+$reseller['customer_no_counter']);
- $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$reseller['customer_no_template']);
+ $customer_no_string = str_replace(array('[CUSTOMER_NO]','[CLIENTID]'),array($customer_no, $reseller['client_id']),$reseller['customer_no_template']);
$app->tpl->setVar('customer_no',$customer_no_string);
}
}
@@ -408,13 +408,7 @@
// password changed
if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
$password = $this->dataRecord["password"];
- $salt="$1$";
- $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
- for ($n=0;$n<8;$n++) {
- $salt.=$base64_alphabet[mt_rand(0, 63)];
- }
- $salt.="$";
- $password = crypt(stripslashes($password), $salt);
+ $password = $app->auth->crypt_password($password);
$client_id = $this->id;
$sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?";
$app->db->query($sql, $password, $client_id);
--
Gitblit v1.9.1