Creating Rule To Checkaccess
Posted 21 September 2013 - 02:14 AM
I think you have not understood my question. I have never mentioned that I am saving plain text password. I am saying that while updating password only normal user will be needing old password before updating new password while admin will not be needing old password for updating new password of any user.
Posted 21 September 2013 - 02:29 AM
array('password_repeat', 'compare', 'compareAttribute' => 'password', 'on' => 'normal user'),
Skype : amodi06
Posted 21 September 2013 - 03:21 AM
Use scenarios. In the action, check if user is an admin (using checkRules) and then switch model scenario based on that. In admin scenario the old password field will not be required and won't be validated. In others it will be.