lib/authlogic_connect/openid/user.rb in authlogic-connect-0.0.4.04 vs lib/authlogic_connect/openid/user.rb in authlogic-connect-0.0.4.05
- old
+ new
@@ -26,10 +26,12 @@
:failed_login_count, :last_request_at, :current_login_at, :last_login_at, :current_login_ip, :last_login_ip, :created_at,
:updated_at, :lock_version]
attrs_to_save = attributes.clone.delete_if do |k, v|
attr_list.include?(k.to_sym)
end
- attrs_to_save.merge!(:password => password, :password_confirmation => password_confirmation)
+ if self.respond_to?(:password) && self.respond_to?(:password_confirmation)
+ attrs_to_save.merge!(:password => password, :password_confirmation => password_confirmation)
+ end
attrs_to_save.reject!{|k, v| v.blank? || !self.respond_to?(k)}
end
end
end
end