Skip to content
Snippets Groups Projects
Commit 91ac7613 authored by tbrehm's avatar tbrehm
Browse files

Fixed: FS#1905 - client_add function in remote api adds duplicate user after...

Fixed: FS#1905 - client_add function in remote api adds duplicate user after returining correct dupliate error.
parent 504203fc
No related branches found
No related tags found
No related merge requests found
......@@ -2158,6 +2158,11 @@ class remoting {
$sql = $app->remoting_lib->getSQL($params,'INSERT',0);
$app->db->query($sql);
//* Check if no system user with that username exists
$username = $app->db->quote($params["username"]);
$tmp = $app->db->queryOneRecord("SELECT count(userid) as number FROm sys_user WHERE username = '$username'");
if($tmp['number'] > 0) $app->remoting_lib->errorMessage .= "Duplicate username<br />";
if($app->remoting_lib->errorMessage != '') {
$this->server->fault('data_processing_error', $app->remoting_lib->errorMessage);
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment