mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG Prevent invalid members being written to database if validation_enabled is false
This commit is contained in:
parent
1c9660d20e
commit
bc2fc7f2db
@ -1654,6 +1654,11 @@ class Member extends DataObject
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
// If validation is disabled, skip this step
|
||||
if (!DataObject::config()->uninherited('validation_enabled')) {
|
||||
return ValidationResult::create();
|
||||
}
|
||||
|
||||
$valid = parent::validate();
|
||||
$validator = static::password_validator();
|
||||
|
||||
|
@ -28,7 +28,7 @@ abstract class PasswordEncryptor
|
||||
*/
|
||||
public static function get_encryptors()
|
||||
{
|
||||
return Config::inst()->get('SilverStripe\\Security\\PasswordEncryptor', 'encryptors');
|
||||
return Config::inst()->get(self::class, 'encryptors');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user