diff --git a/gridserver/usersessions/index.php b/gridserver/usersessions/index.php index 8bd4eb757f..3c189325de 100644 --- a/gridserver/usersessions/index.php +++ b/gridserver/usersessions/index.php @@ -1,4 +1,8 @@ 0) { $info=mysql_fetch_assoc($result); $circuit_code = $info['circuit_code']; - $secure_session_id=$info['secure_session_id']; + if($circuit_code == 0) $circuit_code=$params['4']; + $secure_session_id=$info['secure_session_id']; $session_id=$info['session_id']; $query = "SELECT * FROM local_user_profiles WHERE userprofile_LLUUID='$agent_id'"; @@ -42,9 +55,12 @@ if(mysql_num_rows($result)>0) { $firstname=$userinfo['profile_firstname']; $lastname=$userinfo['profile_lastname']; $agent_id=$userinfo['userprofile_LLUUID']; + $exists=1; +} else { + $exists=0; } -// if only 4 params, assume we are sending an XML response +// if only 3 params, assume we are sending an XML response if(count($params)==3) { output_xml_block("usersession",Array( 'authkey' => $sim_sendkey, @@ -56,6 +72,10 @@ if(count($params)==3) { 'lastname' => $lastname )); } -} +switch($cmd) { + case 'exists': + echo $exists; + break; +} ?>