I’m building a “change password” form for my user built with these fields:
- Old password
- New password
- Confirmation password
I need a way to check if the current logged in user password is the same as “old password” field, are there any possibility to do this, with authlogic? I can’t find a method to test a password.
Authlogic has a valid_password? method. see: http://rubydoc.info/github/binarylogic/authlogic/master/Authlogic/ActsAsAuthentic/Password/Methods/InstanceMethods#valid_password%3F-instance_method
So you could
(or similar)