From 36b9fad2b47ac07df0e01a566d0bec6552729f73 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 28 Jul 2011 13:56:25 +0200 Subject: [PATCH] Added missing registrationDate handling in UserEditor Without this special handling, the registrationDate is 0 for each user. --- wcfsetup/install/files/lib/data/user/UserEditor.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcfsetup/install/files/lib/data/user/UserEditor.class.php b/wcfsetup/install/files/lib/data/user/UserEditor.class.php index 2a5a9e567d..c5fbc3a3aa 100644 --- a/wcfsetup/install/files/lib/data/user/UserEditor.class.php +++ b/wcfsetup/install/files/lib/data/user/UserEditor.class.php @@ -29,6 +29,9 @@ class UserEditor extends DatabaseObjectEditor { $parameters['salt'] = StringUtil::getRandomID(); $parameters['password'] = StringUtil::getDoubleSaltedHash($parameters['password'], $parameters['salt']); + // handle registration date + if (!isset($parameters['registrationDate'])) $parameters['registrationDate'] = TIME_NOW; + $user = parent::create($parameters); // create default values for user options -- 2.20.1