silverstripe-framework/tests/php/Security/MemberTest/ExtendedChangePasswordExtension.php

19 lines
498 B
PHP
Raw Normal View History

<?php
namespace SilverStripe\Security\Tests\MemberTest;
use SilverStripe\Dev\TestOnly;
2024-08-23 19:09:43 +12:00
use SilverStripe\Core\Extension;
use SilverStripe\Core\Validation\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
{
protected function onBeforeChangePassword($newPassword, $valid)
{
$valid->addError('Extension failed to handle Mary changing her password');
}
}