NoamB/sorcery — pull request #467 by gyardley (2013-10-14 23:26:55+00:00)
Title: Fixed unlock_token_mailer_disabled to only disable automatic mailing

In sorcery.rb, unlock_token_mailer_disabled is supposed to 'not automatically send email with unlock token'.

Currently, setting unlock_token_mailed_disabled to 'true' does more than that - when set, it prevents both the unlock_token from being generated and the send_unlock_token_email! method from sending an unlock email when manually called. Users are simply locked out until the timer expires.

I've changed it so unlock_token_mailer_disabled only prevents the unlock email from going out automatically. The unlock_token is still generated, so you can use it for other purposes (for instance, in an SMS). The send_unlock_token_email! still works when called manually, so you could email a user their unlock token if they manually request it.