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

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 ca

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 recei

Protect controller actions from outside requests

2006-11-08 Thread Bret Kuhns
I would like to protect a controller action from being directly accessed directly by its URL. And no, I'm not talking about a user authentication system. I have two controllers: Payments and Orders. Payments is used first to save credit card information from the user, then it redirects to the Orde