{"issue":{"created_at":"2011-11-23T14:14:58Z","state":"open","updated_at":"2011-11-23T14:18:10Z","comments":1,"user":{"gravatar_id":"6a3b78e05f20472aafc29aad3c4a6b4d","id":610852,"url":"https://api.github.com/users/vkill","login":"vkill","avatar_url":"https://secure.gravatar.com/avatar/6a3b78e05f20472aafc29aad3c4a6b4d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"\r\n```ruby\r\nruby-1.9.3-p0 :053 > user.change_password! 123456\r\n   (0.2ms)  BEGIN\r\n   (0.7ms)  SELECT 1 FROM \"users\" WHERE (\"users\".\"username\" = 'aaaaaaa' AND \"users\".\"id\" != 282) LIMIT 1\r\n   (0.9ms)  UPDATE \"users\" SET \"salt\" = 'JqNaHAPvYUPgJqE9gSnL', \"crypted_password\" = '$2a$10$daHHg.xTXl3l9zzziGBk0OWd2PN3RTE.VNiEqwon3fmvWj/EEqbtO', \"updated_at\" = '2011-11-23 22:12:01.802860' WHERE \"users\".\"id\" = 282\r\n   (0.6ms)  COMMIT\r\n => true \r\nruby-1.9.3-p0 :054 > user.reload\r\nruby-1.9.3-p0 :055 > User.authenticate user.email, 123456\r\n  User Load (1.2ms)  SELECT \"users\".* FROM \"users\" WHERE (username = '122755990@qq.com' OR email = '122755990@qq.com') LIMIT 1\r\n => nil \r\nruby-1.9.3-p0 :057 > User.send :credentials_match?, user.crypted_password, 123456,user.salt\r\n => true\r\n```\r\n\r\nwhy ?","assignee":null,"id":2329925,"number":156,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"authenticate method error ","closed_at":null,"html_url":"https://github.com/NoamB/sorcery/issues/156","milestone":null,"url":"https://api.github.com/repos/NoamB/sorcery/issues/156"},"action":"created","comment":{"created_at":"2011-11-23T14:18:10Z","updated_at":"2011-11-23T14:18:10Z","user":{"gravatar_id":"6a3b78e05f20472aafc29aad3c4a6b4d","id":610852,"url":"https://api.github.com/users/vkill","login":"vkill","avatar_url":"https://secure.gravatar.com/avatar/6a3b78e05f20472aafc29aad3c4a6b4d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"```ruby\r\nruby-1.9.3-p0 :058 > user.activate! \r\n   (0.1ms)  BEGIN\r\n   (0.6ms)  UPDATE \"users\" SET \"activation_token\" = NULL, \"activation_state\" = 'active', \"updated_at\" = '2011-11-23 22:16:40.326394' WHERE \"users\".\"id\" = 282\r\n   (0.6ms)  COMMIT\r\n => true \r\nruby-1.9.3-p0 :059 > User.authenticate user.email, 123456  User Load (1.3ms)  SELECT \"users\".* FROM \"users\" WHERE (username = '122755990@qq.com' OR email = '122755990@qq.com') LIMIT 1\r\n => #<User id: 282\r\n```","id":2849086,"url":"https://api.github.com/repos/NoamB/sorcery/issues/comments/2849086"}}