From: Tim Düsterhus Date: Tue, 27 Dec 2016 14:10:14 +0000 (+0100) Subject: Support a nulled password in UserEditor::create() X-Git-Tag: 3.0.0_RC_3~29 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2aa08a11d4ef0ec4abf82490777bad72b4199a90;p=GitHub%2FWoltLab%2FWCF.git Support a nulled password in UserEditor::create() --- diff --git a/wcfsetup/install/files/lib/data/user/UserEditor.class.php b/wcfsetup/install/files/lib/data/user/UserEditor.class.php index c1a19a1642..4a2e0cd03a 100644 --- a/wcfsetup/install/files/lib/data/user/UserEditor.class.php +++ b/wcfsetup/install/files/lib/data/user/UserEditor.class.php @@ -40,7 +40,12 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject { public static function create(array $parameters = []) { // create salt and password hash if ($parameters['password'] !== '') { - $parameters['password'] = PasswordUtil::getDoubleSaltedHash($parameters['password']); + if ($parameters['password'] !== null) { + $parameters['password'] = PasswordUtil::getDoubleSaltedHash($parameters['password']); + } + else { + $parameters['password'] = 'invalid:'; + } } // create accessToken for AbstractAuthedPage