Re: Protect controller actions from outside requests

2006-11-08 Thread Bret Kuhns

@PhpNut

The code snippet you gave me didn't work for me. I searched around and
found this change ticket: https://trac.cakephp.org/changeset/3783/ .
>From the looks of the code, the 'requested' key is set to 1, not a
boolean. I changed my condition operator to == so that PHP would
attempt to cast the integer to a boolean, and that seemed to work.
Except if the action *wasn't* requested, the 'requested' key was not
set and I got PHP notices telling me I had an undefined index. I
changed the condition again to isset($this->params['requested']) and
that seems to have fixed my problems.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Protect controller actions from outside requests

2006-11-08 Thread Bret Kuhns

@PhpNut

Thanks for the quick reply. I tried several queries in the group and on
google looking for what I needed and couldn't find a relevant solution
(almost all results were about user authentication, othAuth,
rdSimpleAuth...). I suppose it helps if you know exactly what to search
for, but I came up with nothing. But thanks for the help :)


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Protect controller actions from outside requests

2006-11-08 Thread Larry E. Masters aka PhpNut
Already covered this in the group before...if($this->params['requested'] === true){//do your thing here}-- /*** @author Larry E. Masters* @var string $userName* @param string $realName
* @returns string aka PhpNut* @access  public*/ 

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.  To post to this group, send email to cake-php@googlegroups.com  To unsubscribe from this group, send email to [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---