Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Guilherme Filippo
ISPConfig 3
Commits
f3a56aaf
Commit
f3a56aaf
authored
Dec 16, 2008
by
tbrehm
Browse files
Fixed: username in sys_user table gets not updated when the username in client form is changed.
parent
aa150015
Changes
3
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/tform.inc.php
View file @
f3a56aaf
...
...
@@ -906,8 +906,8 @@ class tform {
$escape
=
'`'
;
}
$diffrec
=
array
();
$
this
->
diffrec
=
array
();
/*
if(is_array($record_new) && count($record_new) > 0) {
foreach($record_new as $key => $val) {
if(@$record_old[$key] != $val) {
...
...
@@ -926,7 +926,7 @@ class tform {
}
}
$this->diffrec = $diffrec;
*/
// Full diff records for ISPConfig, they have a different format then the simple diffrec
$diffrec_full
=
array
();
...
...
@@ -938,6 +938,8 @@ class tform {
// Record has changed
$diffrec_full
[
'old'
][
$key
]
=
$val
;
$diffrec_full
[
'new'
][
$key
]
=
$record_new
[
$key
];
$this
->
diffrec
[
$key
]
=
array
(
'new'
=>
$record_new
[
$key
],
'old'
=>
$val
);
}
else
{
$diffrec_full
[
'old'
][
$key
]
=
$val
;
$diffrec_full
[
'new'
][
$key
]
=
$val
;
...
...
@@ -949,6 +951,8 @@ class tform {
// Record has changed
$diffrec_full
[
'new'
][
$key
]
=
$val
;
$diffrec_full
[
'old'
][
$key
]
=
$record_old
[
$key
];
$this
->
diffrec
[
$key
]
=
array
(
'old'
=>
@
$record_old
[
$key
],
'new'
=>
$val
);
}
else
{
$diffrec_full
[
'new'
][
$key
]
=
$val
;
$diffrec_full
[
'old'
][
$key
]
=
$val
;
...
...
@@ -956,6 +960,7 @@ class tform {
}
}
//$this->diffrec = $diffrec;
// Insert the server_id, if the record has a server_id
$server_id
=
(
isset
(
$record_old
[
"server_id"
])
&&
$record_old
[
"server_id"
]
>
0
)
?
$record_old
[
"server_id"
]
:
0
;
if
(
isset
(
$record_new
[
"server_id"
]))
$server_id
=
$record_new
[
"server_id"
];
...
...
interface/lib/classes/tform_actions.inc.php
View file @
f3a56aaf
...
...
@@ -114,8 +114,8 @@ class tform_actions {
foreach
(
$this
->
plugins
as
$plugin
)
{
$plugin
->
onInsert
();
}
$this
->
onAfterUpdate
();
$this
->
onAfterUpdate
();
// Write data history (sys_datalog)
if
(
$app
->
tform
->
formDef
[
'db_history'
]
==
'yes'
)
{
...
...
interface/web/client/client_edit.php
View file @
f3a56aaf
...
...
@@ -132,7 +132,7 @@ class page_action extends tform_actions {
global
$app
;
// username changed
if
(
isset
(
$app
->
tform
->
diffrec
[
'username'
])
)
{
if
(
$this
->
oldDataRecord
[
'username'
]
!=
$this
->
dataRecord
[
'username'
])
{
$username
=
mysql_real_escape_string
(
$this
->
dataRecord
[
"username"
]);
$client_id
=
$this
->
id
;
$sql
=
"UPDATE sys_user SET username = '
$username
' WHERE client_id =
$client_id
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment