I was given a task to allow admin users to change the passwords of their subordinates.
So given obviously Admin probably dont know user passwords, I have taken over the following classes:
In effort to change the function isCurrentUser in the UserSubscriber class to return true for users with the admin role. Further within ChangePasswordType I have checked for the admin role so that the builder resembles:123456789101112131415161718$builder->add('plainPassword','repeated',array('required' => true,'type' => 'password','invalid_message' => 'The password fields must match.','options' => array('attr' => array('class' => 'password-field')),'first_options' => array('label' => 'New password'),'second_options' => array('label' => 'Repeat new password'),'mapped' => false,'cascade_validation' => true));
The above all currently works. What I am having trouble doing is taking over the ChangePasswordSubscriber class in order to not remove the PlainPassword field if the original password does not exist.
Any help would be appreciated,
Thanks in advance,
You must be logged in to reply to this topic.