mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '5.1' into 5.2
This commit is contained in:
commit
c36df386ba
@ -521,13 +521,11 @@ class Member extends DataObject
|
||||
|
||||
// If the algorithm or salt is not available, it means we are operating
|
||||
// on legacy account with unhashed password. Do not hash the string.
|
||||
if (!$this->PasswordEncryption) {
|
||||
if (!$this->PasswordEncryption || !$this->Salt) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
// We assume we have PasswordEncryption and Salt available here.
|
||||
$e = PasswordEncryptor::create_for_algorithm($this->PasswordEncryption);
|
||||
|
||||
return $e->encrypt($string, $this->Salt);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user