NoamB/sorcery — Issue #199: Issue in `:user_activation` submodule
Author: nazarhussain
Created: 2012-01-27 09:54:41+00:00
State: open

Hi,

I was implementing your great gem in my existing application while upgrading. But when ever i enabled this module authentication does not match username password.

I dig out your code.

this line

```ruby
user if user && @sorcery_config.before_authenticate.all? {|c| user.send(c)} && credentials_match?(user.send(@sorcery_config.crypted_password_attribute_name),credentials[1],_salt)
```

is causing the issue. `user` is good, `_salt` is also correct value, `credentials_match?` matches, only thing which is returning false values is `@sorcery_config.before_authenticate.all? {|c| user.send(c)}`,

I think it is due to the reason the existing records don't have any activation data in the fields added by the socery. Am i correct? How to correct it and what is the correct values for populating newly generated user_activation fields.

I will wait for your reply.