there aught to be a law against you coming around

        # failed login[: attempts] = @params[: attempts].to_i + 1

 if flash[: attempts] > 3[: error] = 'You seem to be having trouble logging in. If you want
           your password reset,  simply try to log in with the password "forgot'"
 elsif @params[: user][: password].include?('forgot')
 User.find_by_email(@params[: email]).reset_password[: notice] = 'Your password has been reset an emailed to you.'
 else[: error] = 'You provided an incorrect email and password combination.'

More people should do this. It one thing I haven't seen anywhere else and one thing that is more rare than it should be. First of all, it will reset your password and email it to you if you enter 'forgot' in the password box. Secondly, it suggests that you get your password reset if you try to log in with the wrong password too many times. Simple things, but they're worth paying attention to.

« older | 2005-12-05T09:28:35Z | newer »