diff --git a/security/Member.php b/security/Member.php index 0d199bede..507382993 100644 --- a/security/Member.php +++ b/security/Member.php @@ -659,7 +659,7 @@ class Member extends DataObject implements TemplateGlobalProvider { $encryption_details = Security::encrypt_password( $this->Password, // this is assumed to be cleartext $this->Salt, - $this->PasswordEncryption, + ($this->PasswordEncryption) ? $this->PasswordEncryption : Security::get_password_encryption_algorithm(), $this ); diff --git a/tests/security/MemberTest.php b/tests/security/MemberTest.php index 3a8161e44..b485aecd0 100644 --- a/tests/security/MemberTest.php +++ b/tests/security/MemberTest.php @@ -627,4 +627,4 @@ class MemberTest_PasswordValidator extends PasswordValidator { $this->characterStrength(3, array('lowercase','uppercase','digits','punctuation')); } -} \ No newline at end of file +}