Commit 62083141 authored by moglia's avatar moglia
Browse files

Modified loadUserProfile function i discovered using mailuser interface from...

Modified loadUserProfile function i discovered using mailuser interface from horfic after many tests and debugs functions recive a value iguals to userid field not sys_userid.
I keep sysuser_id testing for compatibility issues no have any idea if this used in another place and added aditional userid test. 
Tested all things and used auto-response with roundcube with this modifications all worked fine.
More info see here: http://www.howtoforge.com/forums/showthread.php?t=38437&page=15
parent 2b6dc397
...@@ -149,11 +149,14 @@ class remoting_lib { ...@@ -149,11 +149,14 @@ class remoting_lib {
$this->sys_default_group = 1; $this->sys_default_group = 1;
$this->sys_groups = 1; $this->sys_groups = 1;
} else { } else {
//* load system user //* load system user - try with sysuser and before with userid (workarrond)
$user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE sysuser_id = $client_id"); $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE sysuser_id = $client_id");
if(empty($user["userid"])) { if(empty($user["userid"])) {
$this->errorMessage .= 'No sysuser with the ID $client_id found.'; $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = $client_id");
return false; if(empty($user["userid"])) {
$this->errorMessage .= "No sysuser with the ID $client_id found.";
return false;
}
} }
$this->sys_username = $user['username']; $this->sys_username = $user['username'];
$this->sys_userid = $user['userid']; $this->sys_userid = $user['userid'];
...@@ -162,7 +165,7 @@ class remoting_lib { ...@@ -162,7 +165,7 @@ class remoting_lib {
} }
return true; return true;
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment