Re: Additional checks at login (email validated)

2009-07-21 Thread Sidney

Brilliant! That works perfectly, thanks Dardo for your super fast
help.

[and sorry for not finding it in the cookbook myself. D'oh]

Sid.
--~--~-~--~~~---~--~~
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: Additional checks at login (email validated)

2009-07-21 Thread Dardo Sordi Bogado

http://book.cakephp.org/view/487/userScope

On Tue, Jul 21, 2009 at 8:30 PM, Sidney wrote:
>
> In my app I require users to register with a valid email address,
> which I send an email to with a link to a confirmation page. This page
> checks the validity of the ticket (hash) embedded on the link and sets
> a Validated flag on the user record. This works fine (although the
> email looks a little ugly).
>
> So I think I've done the "hard" part, but I'm unsure how to do the
> "simple" bit.
>
> How should I change the login functionality to check the user's
> status? It currently checks the password using Auth out-of-the-box
> functionality i.e. uses an empty login() function in the Users
> controller.
> Should I write a new login function from scratch or should I be adding
> code to beforeFilter and somehow leveraging what is already working
> (not sure how to mix my validation and error messages with cake/auth's
> own)?
>
> Thanks in advance,
> Sid.
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Additional checks at login (email validated)

2009-07-21 Thread Sidney

In my app I require users to register with a valid email address,
which I send an email to with a link to a confirmation page. This page
checks the validity of the ticket (hash) embedded on the link and sets
a Validated flag on the user record. This works fine (although the
email looks a little ugly).

So I think I've done the "hard" part, but I'm unsure how to do the
"simple" bit.

How should I change the login functionality to check the user's
status? It currently checks the password using Auth out-of-the-box
functionality i.e. uses an empty login() function in the Users
controller.
Should I write a new login function from scratch or should I be adding
code to beforeFilter and somehow leveraging what is already working
(not sure how to mix my validation and error messages with cake/auth's
own)?

Thanks in advance,
Sid.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---