Skip to content

Commit 4787bc1

Browse files
committed
Fixed a bug in the loadUserProfile function of the remoting API.
1 parent 4cc356d commit 4787bc1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/lib/classes/remoting_lib.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,17 @@ function loadUserProfile($client_id = 0) {
150150
$this->sys_groups = 1;
151151
} else {
152152
//* load system user - try with sysuser and before with userid (workarrond)
153+
/*
153154
$user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE sysuser_id = $client_id");
154155
if(empty($user["userid"])) {
155156
$user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = $client_id");
156157
if(empty($user["userid"])) {
157158
$this->errorMessage .= "No sysuser with the ID $client_id found.";
158159
return false;
159160
}
160-
}
161+
}*/
162+
163+
$user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE client_id = $client_id");
161164
$this->sys_username = $user['username'];
162165
$this->sys_userid = $user['userid'];
163166
$this->sys_default_group = $user['default_group'];

0 commit comments

Comments
 (0)