mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-28 10:06:33 +00:00
Merge
This commit is contained in:
commit
e879f1449a
2 changed files with 59 additions and 60 deletions
|
@ -21,7 +21,7 @@ class Ticket_User{
|
||||||
*/
|
*/
|
||||||
public static function createTicketUser( $extern_id, $permission) {
|
public static function createTicketUser( $extern_id, $permission) {
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->insert("ticket_user",array('Permission' => $permission, 'ExternId' => $extern_id));
|
$dbl->insert("ticket_user",array('TUserId' => $extern_id, 'Permission' => $permission, 'ExternId' => $extern_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -286,9 +286,11 @@ class Users{
|
||||||
* @param $user_id the extern id of the user (the id given by the www/CMS)
|
* @param $user_id the extern id of the user (the id given by the www/CMS)
|
||||||
* @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.
|
* @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){
|
public static function createUser($values, $user_id) {
|
||||||
|
ticket_user::createTicketUser($user_id, 1);
|
||||||
try {
|
try {
|
||||||
//make connection with and put into shard db
|
//make connection with and put into shard db
|
||||||
|
$values["UId"] = $user_id;
|
||||||
$dbs = new DBLayer("shard");
|
$dbs = new DBLayer("shard");
|
||||||
$dbs->insert("user", $values);
|
$dbs->insert("user", $values);
|
||||||
/*
|
/*
|
||||||
|
@ -298,7 +300,6 @@ class Users{
|
||||||
$valuesRing['user_type'] = 'ut_pioneer';
|
$valuesRing['user_type'] = 'ut_pioneer';
|
||||||
$dbr->insert("ring_users", $valuesRing);
|
$dbr->insert("ring_users", $valuesRing);
|
||||||
*/
|
*/
|
||||||
ticket_user::createTicketUser( $user_id, 1);
|
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
catch (PDOException $e) {
|
catch (PDOException $e) {
|
||||||
|
@ -306,15 +307,13 @@ class Users{
|
||||||
try {
|
try {
|
||||||
$dbl = new DBLayer("lib");
|
$dbl = new DBLayer("lib");
|
||||||
$dbl->insert("ams_querycache", array("type" => "createUser",
|
$dbl->insert("ams_querycache", array("type" => "createUser",
|
||||||
"query" => json_encode(array($values["Login"],$values["Password"],$values["Email"])), "db" => "shard"));
|
"query" => json_encode(array($values["Login"], $values["Password"], $values["Email"])), "db" => "shard"));
|
||||||
ticket_user::createTicketUser( $user_id , 1 );
|
|
||||||
return "shardoffline";
|
return "shardoffline";
|
||||||
}catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
print_r($e);
|
print_r($e);
|
||||||
return "liboffline";
|
return "liboffline";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue