Tuesday, 7 October 2014

Codeigniter session user data isnot returned in the posted XML document



I got a problem returning the value to the Vendor .


I have a web application. Once login , it will open an iframe which will load a vendor's site. To be able to load this, Vendor would check the cookie variable that is created on login process and call our API URL that returns an XML document.


Right now the issue is when the vendor call a function that created the XML. The Codeigniter session user data is read as NULL.



Player user_name : JOHN.

<aut version="2.0">
<player_id>ID_<?php echo $this->session->user_name;?></player_id>
<status_code>OK</status_code>
</auth>


Result:



<aut version="2.0">
<player_id>ID_</player_id>
<status_code>OK</status_code>
</auth>


Expected Result :



<aut version="2.0">
<player_id>ID_JOHN</player_id>
<status_code>OK</status_code>
</auth>


**On my testing on the site, I have made a POST FORM in my web application after login and call the function. It returned the expected result. (player username is retrieved)


PS. Once login I try echo the session data and it is successfully returned too **


Vendor are using POST_FORM too but said that the XML document is in good form but they got no user_name. (player username isnot retrieved) SO I am confused. Does anybody know how to solve this?


No comments:

Post a Comment