Re: Prevent redirect in Auth

2008-12-15 Thread Rob

Absolutely, it's entirely in your control when and how you redirect.
Auth just protects the pages that you tell it to, and redirects you to
login if that is needed.


On Dec 11, 9:40 am, Dav  wrote:
> Hi,
>
> I want to use the Auth component but I don't want it to send out the
> location: header.
> (I'm not using ajax)
>
> I just want to be able to override and control what should happen when
> a controller with auth is accessed.
>
> For instance just print out a custom error message.
>
> Doable?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prevent redirect in Auth

2008-12-12 Thread gearvOsh

It seems you will have to remove/comment out that part that redirects
in the auth component manually.

On Dec 12, 4:41 am, Dav  wrote:
> Tried that earlier, still redirects to "users/login".
>
> I have this in my controller
> function beforeFilter() {
>     $this->Auth->autoRedirect = false;
>
> }
>
> function login() {
>         e('login...');
>         die;
>
> }
>
> But it doesn't run, still redirect.
>
> Isn't the autoRedirect prop for After a login post has been made?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prevent redirect in Auth

2008-12-12 Thread Dav

Tried that earlier, still redirects to "users/login".

I have this in my controller
function beforeFilter() {
$this->Auth->autoRedirect = false;
}

function login() {
e('login...');
die;
}

But it doesn't run, still redirect.

Isn't the autoRedirect prop for After a login post has been made?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Prevent redirect in Auth

2008-12-11 Thread gearvOsh

Perhaps look at this: http://book.cakephp.org/view/395/autoRedirect

If that doesnt work, you may have to edit the core files manually.

On Dec 11, 9:40 am, Dav  wrote:
> Hi,
>
> I want to use the Auth component but I don't want it to send out the
> location: header.
> (I'm not using ajax)
>
> I just want to be able to override and control what should happen when
> a controller with auth is accessed.
>
> For instance just print out a custom error message.
>
> Doable?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Prevent redirect in Auth

2008-12-11 Thread Dav

Hi,

I want to use the Auth component but I don't want it to send out the
location: header.
(I'm not using ajax)

I just want to be able to override and control what should happen when
a controller with auth is accessed.

For instance just print out a custom error message.

Doable?

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