silverstripe-framework/tests/php/Security/MemberTest/ExtendedChangePasswordExtension.php
Guy Sartorelli e2e32317d6
API Move various classes to more appropriate namespaces (#11370)
Also rename ViewableData to ModelData ahead of the template layer
lift-and-shift
2024-09-23 14:31:50 +12:00

19 lines
498 B
PHP

<?php
namespace SilverStripe\Security\Tests\MemberTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\Core\Extension;
use SilverStripe\Core\Validation\ValidationResult;
/**
* Extension that does something extra when changing a member's password
*/
class ExtendedChangePasswordExtension extends Extension implements TestOnly
{
protected function onBeforeChangePassword($newPassword, $valid)
{
$valid->addError('Extension failed to handle Mary changing her password');
}
}