well, i haven't done this specifically so I'm not sure I can
demonstrate exactly how, but you probably either have to allow
('addToWatchlist') in your before filter then instead test if the
request comes from a logged in user in that action before you add the
link to the watch list. If it does NOT, you can serve up a login form
in a popup window via AJAX, but you won't be redirected unless you do
some kind of javascript XML or JSON test on the response.
The reason you don't redirect is that if you let auth handle the
'behind the scenes' request, it will simply re-route the request to
your default login redirect - probably the login page - which won't do
anything at all since you aren't doing anything with the request. You
should read up on AJAX. If you want to know how to serve up a login
form with AJAX and submit it start with a basic AJAX tutorial and go
from there?http://www.w3schools.com/Ajax/Default.Asp On May 20, 4:21 pm, Luke <[email protected]> wrote: > Hi, > > I am not sure what else I could copy & paste from the sourcecode. I > only have a normal login action, in my user controller, which only > saves the last login and thats pretty much it. An Login AJAX action? > How would this look? > Have you got an example? > > Thanks. Luke > > On 20 Mai, 22:18, christo <[email protected]> wrote: > > > all I can think of is that you don't have a login AJAX action set up > > so the request dies without redirecting to a log in if you try to > > access the link from not logged in? I dunno it's hard to tell from > > your description. pastebin maybe? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
