Yii Framework Forum: How To Validate Old Password - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Validate Old Password Rate Topic: -----

#1 User is offline   nirmalroka 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 53
  • Joined: 10-July 12
  • Location:Kathmandu Nepal

Posted 26 January 2013 - 01:31 PM

Hi i have three fields in yii change password form as old_password,new_password,confirm_password. I would like to validate old_password matched or not in yii method.

I would expect the answer for this . Thank you.
0

#2 User is offline   bit0123 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 75
  • Joined: 01-February 12
  • Location:Bangladesh

Posted 26 January 2013 - 02:59 PM

View Postnirmalroka, on 26 January 2013 - 01:31 PM, said:

Hi i have three fields in yii change password form as old_password,new_password,confirm_password. I would like to validate old_password matched or not in yii method.

I would expect the answer for this . Thank you.


Basic steps to validate Old Password:
1. Perform DB query for retrieving the actual password(current active password).
If you store the password after hashing :
=> Get the old_password from the form and hash this old_password
2. Compare two password if they match or not
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users