# File lib/merb-auth-more/mixins/salted_user/relaxdb_salted_user.rb, line 6 6: def self.extended(base) 7: base.class_eval do 8: 9: property :crypted_password 10: 11: if Merb::Authentication::Mixins::SaltedUser > base 12: property :salt 13: end 14: 15: before_save :password_checks 16: 17: def password_checks 18: if password_required? 19: return false unless !password.blank? && password == password_confirmation 20: end 21: encrypt_password 22: true 23: end 24: 25: end 26: end
# File lib/merb-auth-more/mixins/salted_user/relaxdb_salted_user.rb, line 28 28: def authenticate(login, password) 29: login_param = Merb::Authentication::Strategies::Basic::Base.login_param 30: @u = all.sorted_by(login_param) { |q| q.key(login) }.first 31: @u && @u.authenticated?(password) ? @u : nil 32: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.