Skip to content

Commit 1c5959a

Browse files
committed
Changes in the client form that modify sys_user were not logged to the datalog correctly.
1 parent cdda6b9 commit 1c5959a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

interface/web/client/client_edit.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,15 @@ function onAfterUpdate() {
135135
if($this->oldDataRecord['username'] != $this->dataRecord['username']) {
136136
$username = mysql_real_escape_string($this->dataRecord["username"]);
137137
$client_id = $this->id;
138-
$sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";
139-
$app->db->query($sql);
140-
$sql = "UPDATE sys_group SET name = '$username' WHERE client_id = $client_id";
141-
$app->db->query($sql);
138+
$app->db->datalogUpdate('sys_user', "username = '$username'", 'client_id', $client_id);
139+
$app->db->datalogUpdate('sys_group', "name = '$username'", 'client_id', $client_id);
142140
}
143141

144142
// password changed
145143
if(isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
146144
$password = mysql_real_escape_string($this->dataRecord["password"]);
147145
$client_id = $this->id;
148-
$sql = "UPDATE sys_user SET passwort = md5('$password') WHERE client_id = $client_id";
149-
$app->db->query($sql);
146+
$app->db->datalogUpdate('sys_user', "passwort = md5('$password')", 'client_id', $client_id);
150147
}
151148

152149
// reseller status changed
@@ -155,8 +152,7 @@ function onAfterUpdate() {
155152
if($this->dataRecord["limit_client"] > 0) $modules .= ',client';
156153
$modules = mysql_real_escape_string($modules);
157154
$client_id = $this->id;
158-
$sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id";
159-
$app->db->query($sql);
155+
$app->db->datalogUpdate('sys_user', "modules = '$modules'", 'client_id', $client_id);
160156
}
161157
/*
162158
* If there is a client-template, process it */

0 commit comments

Comments
 (0)