SeLLeRoNe
Super Moderator
Hi,
im having a strange bug with the API for create a DB for one user.
Here the code:
The bug is this.
When DB get created (the API work correctly) the user account pass get changed to the DB pass aswell O_O
So, if user have userpass "AAA" and dbpass is "BBB" after the db get created userpass is "BBB" and dbpass is "BBB".
Hope someone can help me on it, or, DA Staff solve this issue/bug.
Thanks
Regards
im having a strange bug with the API for create a DB for one user.
Here the code:
Code:
<?php
include 'httpsocket.php';
$dbuser = "databaseuser";
$dbname = "databasebname";
$dbpass = "databasepass";
$sock = new HTTPSocket;
$sock->connect('localhost',2222);
$sock->set_login("admin|cn_user","password");
$sock->set_method('POST');
$sock->query('/CMD_API_DATABASES',
array(
'action' => 'create',
'name' => $dbname,
'user' => $dbuser,
'passwd' => $dbpass,
'passwd2' => $dbpass,
'create' => 'Create'
));
$result = $sock->fetch_body();
?>
The bug is this.
When DB get created (the API work correctly) the user account pass get changed to the DB pass aswell O_O
So, if user have userpass "AAA" and dbpass is "BBB" after the db get created userpass is "BBB" and dbpass is "BBB".
Hope someone can help me on it, or, DA Staff solve this issue/bug.
Thanks
Regards
Last edited: