Added missing registrationDate handling in UserEditor
authorMatthias Schmidt <gravatronics@live.com>
Thu, 28 Jul 2011 11:56:25 +0000 (13:56 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 28 Jul 2011 11:56:25 +0000 (13:56 +0200)
Without this special handling, the registrationDate is 0 for each user.

wcfsetup/install/files/lib/data/user/UserEditor.class.php

index 2a5a9e567d9adf818a2041bf3ec5371b5d4a39cb..c5fbc3a3aa129901d32ae0d41fcd449228f7b5ba 100644 (file)
@@ -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