Class: Spree::LegacyUser
- Inherits:
-
Object
- Object
- Spree::LegacyUser
- Includes:
- UserAddress, UserMethods, UserPaymentSource
- Defined in:
- app/models/spree/legacy_user.rb
Constant Summary
Constants included from PrefixedId
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
Instance Method Summary collapse
-
#valid_password?(check_password) ⇒ Boolean
Simple password validation for testing purposes In production, Spree.user_class should be overridden with a proper auth solution (e.g., Devise).
Methods included from UserMethods
#available_store_credits, #can_be_deleted?, #default_wishlist_for_store, #event_prefix, #event_serializer_class, #full_name, #last_incomplete_spree_order, #to_csv, #total_available_store_credit
Methods included from Publishable
#event_context, #event_payload, #event_prefix, #event_serializer_class, #publish_event
Methods included from UserReporting
#amount_spent_in, #average_order_value, #completed_orders_for_store, #display_amount_spent_in, #lifetime_value, #order_count, #report_values_for
Methods included from DisplayMoney
Methods included from Metadata
#metadata, #metadata=, #public_metadata=
Methods included from PrefixedId
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
12 13 14 |
# File 'app/models/spree/legacy_user.rb', line 12 def password @password end |
#password_confirmation ⇒ Object
Returns the value of attribute password_confirmation.
12 13 14 |
# File 'app/models/spree/legacy_user.rb', line 12 def password_confirmation @password_confirmation end |
Instance Method Details
#valid_password?(check_password) ⇒ Boolean
Simple password validation for testing purposes In production, Spree.user_class should be overridden with a proper auth solution (e.g., Devise)
21 22 23 24 25 |
# File 'app/models/spree/legacy_user.rb', line 21 def valid_password?(check_password) return false if encrypted_password.blank? BCrypt::Password.new(encrypted_password) == check_password end |