Sunday, October 30, 2011

Re: Question about login function (cakephp 2.0)

i wanted to post the link with hash:
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html?highlight=login#identifying-users-and-logging-them-in

On 31 Okt., 00:51, euromark <dereurom...@googlemail.com> wrote:
> http://book.cakephp.org/2.0/en/core-libraries/components/authenticati...
>
> On 30 Okt., 22:01, gloop <gl...@web.de> wrote:
>
>
>
>
>
>
>
> > Hello everybody,
>
> > i try cakephp 2.0 and the login sequence is very diffrent to cakephp
> > 1.3.
>
> > In 1.3 its "magic" and you can type function login(){}
>
> > In 2.0 i must write a bit more:
>
> > public function login() {
> >     if ($this->Auth->login()) {
> >         $this->redirect($this->Auth->redirect());
> >     } else {
> >         $this->Session->setFlash(__('Invalid username or password, try
> > again'));
> >     }
>
> > }
>
> > Now i have the problem when i open /users/login i have always the
> > flash message.
>
> > What is the correct way to set the message only when i submit?
>
> > Thank you!
>
> > gloop

--
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
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: