Changeset 340
- Timestamp:
- 04/05/06 10:12:33 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
login_engine/branches/rb_1.0/lib/login_engine/authenticated_user.rb
r282 r340 28 28 attr_accessor :password, :password_confirmation 29 29 30 after_save '@new_password = false'30 after_save :falsify_new_password 31 31 after_validation :crypt_password 32 32 33 33 end 34 34 base.extend(ClassMethods) … … 130 130 end 131 131 132 def falsify_new_password 133 @new_password = false 134 true 135 end 136 132 137 def new_security_token(hours = nil) 133 138 write_attribute('security_token', AuthenticatedUser.hashed(self.salted_password + Time.now.to_i.to_s + rand.to_s))
