well that was a view linked directly by the router, e.g., /admin
thus there's no controller action associated to that... Lorenzo John Andersen wrote: > Make the check in the controller and do the redirect from there! > Enjoy, > John > > On Jan 2, 7:01 pm, Lorenzo Bettini <[email protected]> wrote: >> Hi >> >> is there a way to perform a redirect from inside a view? >> >> For instance if the user is not logged. >> >> I can do this manually like this: >> >> <?php >> if (!$session->check('User')) { >> header ("Location: ".$html->url('/'));} >> >> ?> >> >> but I was wondering if there was a more "cake" way to do this. >> >> thanks in advance >> Lorenzo >> -- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
