Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Jonas
ISPConfig 3
Commits
95d4d5cf
Commit
95d4d5cf
authored
Jul 03, 2018
by
Choong Wei Tjeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also update sys_user language if it was specified through API client_update
parent
7c05ac39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
interface/lib/classes/remoting_lib.inc.php
interface/lib/classes/remoting_lib.inc.php
+10
-1
No files found.
interface/lib/classes/remoting_lib.inc.php
View file @
95d4d5cf
...
...
@@ -308,7 +308,9 @@ class remoting_lib extends tform_base {
global
$app
;
$username
=
$params
[
"username"
];
$clear_password
=
$params
[
"password"
];
$language
=
$params
[
'language'
];
$client_id
=
$app
->
functions
->
intval
(
$client_id
);
if
(
!
isset
(
$params
[
'_ispconfig_pw_crypted'
])
||
$params
[
'_ispconfig_pw_crypted'
]
!=
1
)
$password
=
$app
->
auth
->
crypt_password
(
stripslashes
(
$clear_password
));
else
$password
=
$clear_password
;
$params
=
array
(
$username
);
...
...
@@ -318,8 +320,15 @@ class remoting_lib extends tform_base {
}
else
{
$pwstring
=
""
;
}
$langstring
=
''
;
if
(
!
empty
(
$language
))
{
$langstring
=
', language = ?'
;
$params
[]
=
$language
;
}
$params
[]
=
$client_id
;
$sql
=
"UPDATE sys_user set username = ?
$pwstring
WHERE client_id = ?"
;
$sql
=
"UPDATE sys_user set username = ?
$pwstring
$langstring
WHERE client_id = ?"
;
$app
->
db
->
query
(
$sql
,
true
,
$params
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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