What seems to be happening is that it's not picking up the login
action. It's as if it just goes to 'users/login' and (as there's
nothing in there that does anything with the data), it just shows it
again.
In app_controller I have
function beforeFilter() {
$this->Auth->loginAction = array('controller' => 'users',
'action'
=> 'login');
...
}
but it seems to be ignoring this. It's like it's not even attempting
to log me in.
Anyone have any ideas? I've cleared the cache a few times, and that
didn't make any difference.
Thanks again,
Sharon
On Feb 7, 12:34 pm, WhyNotSmile <[email protected]> wrote:
> Yes, I have a function in the users_controller called login. It's the
> one I gave a couple of posts ago.
>
> At one point this was all working, but it's not any more! Argh!
>
> Thanks for all the help.
>
> Sharon
>
> On Feb 7, 11:42 am, andy_the ultimate baker
>
> <[email protected]> wrote:
> > hi,
> > have u given the login action in ur controller?
>
> > On Feb 7, 4:35 pm, WhyNotSmile <[email protected]> wrote:
>
> > > Thanks.
>
> > > I've done that now, and it's still not working. I'm not even getting
> > > auth error messages - it's just taking me back to the login form.
>
> > > Any ideas what could be going wrong?
>
> > > Thanks,
> > > Sharon
>
> > > On Feb 5, 7:39 pm, cricket <[email protected]> wrote:
>
> > > > On Sat, Feb 5, 2011 at 11:42 AM, WhyNotSmile
> > > > <[email protected]> wrote:
> > > > > Thanks for your response OldWest. I've just changed how this is done,
> > > > > but it's still not working.
>
> > > > > I would like the login page to appear like a regular page, so I want
> > > > > users to be able to enter '/pages/membership' and be taken to the
> > > > > page, which looks like all the others.
>
> > > > > I've routed it like this:
>
> > > > > (in routes.php)
> > > > > Router::connect('/pages/membership', array('controller' => 'users',
> > > > > 'action' => 'login'));
> > > > > Router::connect('/pages/*', array('controller' => 'pages', 'action'
> > > > > => 'view'));
>
> > > > You're needlessly complicating things by having PagesController also
> > > > deal with logging in. There's no need to do this. Create an element
> > > > with your login form and have it point to UsersController::login as
> > > > normal. Include the element inside views/users/login.ctp and also
> > > > inside any other page or layout where you'd like people to be able to
> > > > log in from.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php