[eluser]Unknown[/eluser]
Hi,
I posted this on stack overflow and have not had much of a response so I thought I would try it here:
I am trying to get zendamf working with my codeigniter installation. I want to ensure that the user has logged on before allowing them to make any requests to any of the services. I have the following piece of code in my construct for the Testservice.php file.
Code:
function __construct()
{
parent::__construct();
if(isset($this->session->userdata['user_id']))
{
log_message('error','not logged in');
return 'Not Logged in';
exit;
}
else
{
log_message('error','logged in');
}
}
And this for my test function
Code:
public function getMessage()
{
return 'getmessage';
}
When i make a call to the service I get the string 'getmessage' returned irrespective of being logged in or not. I can see the log messages been written for the login check but it I want it to send me the text specifed in the return for each of the conditions.
Any ideas
Thanks in advance
JaChNo