I need to keep SS passwords in sync with another system. So I defined a SyncedMember class in a SyncedMember.php file. I then set up my own custom changePassword:
class SyncedMember extends DataExtension {
public function changePassword($password) {
$valid = $this->owner->changePassword($password);
if ($valid) {
// do my actual logic here to update the password in my other system
}
}
return $valid;
}
}
It's not getting called when I run through the dialog in /Security/changepassword. I have tried making the first line of the function in the extension 'garbagecall();' to see if it was a problem with the details of my code, but there's no error. The extension's changePassword isn't getting called at all.
I have several other DataObject extensions working successfully. In my _config.php I have:
Object::add_extension('Member', 'SyncedMember');
I ran dev/build and flushed before trying my changes. I am on SS 3.0. If I directly edit the changePassword definition in framework/security/Member.php it works as expected.