|
|
@ -50,11 +50,13 @@ function write_user($newUser){
|
|
|
|
//returns: ok, shardoffline or liboffline
|
|
|
|
//returns: ok, shardoffline or liboffline
|
|
|
|
$result = WebUsers::createUser($params);
|
|
|
|
$result = WebUsers::createUser($params);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
try{
|
|
|
|
//make connection with web db and put it in there
|
|
|
|
|
|
|
|
global $cfg;
|
|
|
|
global $cfg;
|
|
|
|
|
|
|
|
//make connection with web db and put it in there
|
|
|
|
$dbw = new DBLayer($cfg['db']['web']);
|
|
|
|
$dbw = new DBLayer($cfg['db']['web']);
|
|
|
|
$dbw->execute("INSERT INTO ams_user (Login, Password, Email) VALUES (:name, :pass, :mail)",$params);
|
|
|
|
$dbw->execute("INSERT INTO ams_user (Login, Password, Email) VALUES (:name, :pass, :mail)",$params);
|
|
|
|
|
|
|
|
ticket_user::createTicketUser( WebUsers::getId($newUser["name"]), 1, $cfg['db']['lib'] );
|
|
|
|
|
|
|
|
|
|
|
|
}catch (PDOException $e) {
|
|
|
|
}catch (PDOException $e) {
|
|
|
|
//go to error page or something, because can't access website db
|
|
|
|
//go to error page or something, because can't access website db
|
|
|
|