I'm jumping pretty late into this, so I don't know if this idea has been dismissed yet. Here's what I do:

Start with this:

By default this creates a salted one-way password. If you need reversible passwords, you can do this:

If you would like to enable user-authentication use this:

And this for the email notification:


On Oct 11, 2006, at 3:11 PM, Patrick Crowley wrote:

Yeah, to clarify, I also have a Notifications model that contains all of my email-related methods, so UserVerification is probably still overkill for my purposes.


The SHA-1 key is stored in a field called unverified, so I can do this:


if @user.unverified?

  # user isn't verified yet

else

  # user is verified :)

end


I've also added a method that will allow users to resend the verification email, if it fails to show up in a timely fashion.


Best,

Patrick


_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to