|
|
|
@ -287,8 +287,10 @@ class Users{
|
|
|
|
|
* @return ok if it's get correctly added to the shard, else return lib offline and put in libDB, if libDB is also offline return liboffline.
|
|
|
|
|
*/
|
|
|
|
|
public static function createUser($values, $user_id) {
|
|
|
|
|
ticket_user::createTicketUser($user_id, 1);
|
|
|
|
|
try {
|
|
|
|
|
//make connection with and put into shard db
|
|
|
|
|
$values["UId"] = $user_id;
|
|
|
|
|
$dbs = new DBLayer("shard");
|
|
|
|
|
$dbs->insert("user", $values);
|
|
|
|
|
/*
|
|
|
|
@ -298,7 +300,6 @@ class Users{
|
|
|
|
|
$valuesRing['user_type'] = 'ut_pioneer';
|
|
|
|
|
$dbr->insert("ring_users", $valuesRing);
|
|
|
|
|
*/
|
|
|
|
|
ticket_user::createTicketUser( $user_id, 1);
|
|
|
|
|
return "ok";
|
|
|
|
|
}
|
|
|
|
|
catch (PDOException $e) {
|
|
|
|
@ -307,14 +308,12 @@ class Users{
|
|
|
|
|
$dbl = new DBLayer("lib");
|
|
|
|
|
$dbl->insert("ams_querycache", array("type" => "createUser",
|
|
|
|
|
"query" => json_encode(array($values["Login"], $values["Password"], $values["Email"])), "db" => "shard"));
|
|
|
|
|
ticket_user::createTicketUser( $user_id , 1 );
|
|
|
|
|
return "shardoffline";
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
print_r($e);
|
|
|
|
|
return "liboffline";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|