2017-10-03 17:57:52 +13:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\Security\Tests\MemberTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
2024-08-23 19:09:43 +12:00
|
|
|
use SilverStripe\Core\Extension;
|
2017-10-03 17:57:52 +13:00
|
|
|
use SilverStripe\ORM\ValidationResult;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Extension that does something extra when changing a member's password
|
|
|
|
*/
|
2024-08-23 19:09:43 +12:00
|
|
|
class ExtendedChangePasswordExtension extends Extension implements TestOnly
|
2017-10-03 17:57:52 +13:00
|
|
|
{
|
2024-05-21 09:51:51 +12:00
|
|
|
protected function onBeforeChangePassword($newPassword, $valid)
|
2017-10-03 17:57:52 +13:00
|
|
|
{
|
|
|
|
$valid->addError('Extension failed to handle Mary changing her password');
|
|
|
|
}
|
|
|
|
}
|