Remove invalid behaviour with ring databases

This commit is contained in:
kaetemi 2014-09-02 19:56:37 +02:00
parent f0d994edd4
commit 3e06bf376f
3 changed files with 148 additions and 140 deletions

View file

@ -220,6 +220,10 @@ global $TIME_FORMAT;
* @return returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name. * @return returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name.
*/ */
static public function check_login_ingame() { static public function check_login_ingame() {
return NULL;
// FIXME
/*
if ( helpers :: check_if_game_client () or $forcelibrender = false ) { if ( helpers :: check_if_game_client () or $forcelibrender = false ) {
$dbr = new DBLayer( "ring" ); $dbr = new DBLayer( "ring" );
if ( isset( $_GET['UserId'] ) && isset( $_COOKIE['ryzomId'] ) ) { if ( isset( $_GET['UserId'] ) && isset( $_COOKIE['ryzomId'] ) ) {
@ -243,4 +247,7 @@ if ( helpers :: check_if_game_client () or $forcelibrender = false ) {
return "FALSE"; return "FALSE";
} }
} }
*/
}
} }

View file

@ -291,11 +291,13 @@ class Users{
//make connection with and put into shard db //make connection with and put into shard db
$dbs = new DBLayer("shard"); $dbs = new DBLayer("shard");
$dbs->insert("user", $values); $dbs->insert("user", $values);
/*
$dbr = new DBLayer("ring"); $dbr = new DBLayer("ring");
$valuesRing['user_id'] =$user_id; $valuesRing['user_id'] =$user_id;
$valuesRing['user_name'] = $values['Login']; $valuesRing['user_name'] = $values['Login'];
$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); ticket_user::createTicketUser( $user_id, 1);
return "ok"; return "ok";
} }

View file

@ -11,7 +11,7 @@ function login(){
if (helpers::check_if_game_client()) { if (helpers::check_if_game_client()) {
//check if you are logged in ingame, this should auto login //check if you are logged in ingame, this should auto login
$result = Helpers::check_login_ingame(); $result = Helpers::check_login_ingame();
if( $result != "FALSE"){ if ($result) {
//handle successful login //handle successful login
$_SESSION['user'] = $result['name']; $_SESSION['user'] = $result['name'];
$_SESSION['id'] = WebUsers::getId($result['name']); $_SESSION['id'] = WebUsers::getId($result['name']);
@ -35,5 +35,4 @@ function login(){
} }
$pageElements['getstring'] = $GETString; $pageElements['getstring'] = $GETString;
return $pageElements; return $pageElements;
} }