Get the user out of the database:
user = User.find_by_email(params[:email])
Then you can check their password with:
user.valid_password?(params[:password])
Get the user out of the database:
user = User.find_by_email(params[:email])
Then you can check their password with:
user.valid_password?(params[:password])