LDAPService::setPassword
Change a members password on the AD. Works with ActiveDirectory compatible services that saves the password in the `unicodePwd` attribute.
Signature
public function setPassword(Member
$member,
string
$password,
[string|null
$oldPassword = NULL] )
Parameters
$member
— Member
$password
— string$oldPassword
— object- Supply old password to perform a password change (as opposed to password reset)
Returns
- ValidationResult
Errors/Exceptions
Line | Task |
---|---|
949+ | Use the Zend\Ldap\Attribute::setPassword functionality to create a password in an abstract way, so it works on other LDAP directories, not just Active Directory. Ensure that the LDAP bind:ed user can change passwords and that the connection is secure. |