Commit 188b6f48 authored by Marin Jankovski's avatar Marin Jankovski

Use a better name for token.

parent 8968f6d8
...@@ -241,12 +241,12 @@ class User < ActiveRecord::Base ...@@ -241,12 +241,12 @@ class User < ActiveRecord::Base
end end
def generate_reset_token def generate_reset_token
@token, enc = Devise.token_generator.generate(self.class, :reset_password_token) @reset_token, enc = Devise.token_generator.generate(self.class, :reset_password_token)
self.reset_password_token = enc self.reset_password_token = enc
self.reset_password_sent_at = Time.now.utc self.reset_password_sent_at = Time.now.utc
@token @reset_token
end end
def namespace_uniq def namespace_uniq
...@@ -497,7 +497,7 @@ class User < ActiveRecord::Base ...@@ -497,7 +497,7 @@ class User < ActiveRecord::Base
def post_create_hook def post_create_hook
log_info("User \"#{self.name}\" (#{self.email}) was created") log_info("User \"#{self.name}\" (#{self.email}) was created")
notification_service.new_user(self, @token) notification_service.new_user(self, @reset_token)
system_hook_service.execute_hooks_for(self, :create) system_hook_service.execute_hooks_for(self, :create)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment