From: Matthias Schmidt Date: Tue, 13 May 2014 20:34:27 +0000 (+0200) Subject: Fix checks in UserRegistrationDateCondition X-Git-Tag: 2.1.0_Alpha_1~829 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7df900ce4285c7f2b338828f212ac37e78ece4c1;p=GitHub%2FWoltLab%2FWCF.git Fix checks in UserRegistrationDateCondition --- diff --git a/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php index 37a4e59d79..b0a95eeee7 100644 --- a/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php @@ -39,7 +39,7 @@ class UserRegistrationDateCondition extends AbstractSingleFieldCondition impleme */ public function addUserCondition(Condition $condition, UserList $userList) { if ($condition->registrationDateEnd !== null) { - $userList->getConditionBuilder()->add('user_table.registrationDate <= ?', array(strtotime($condition->registrationDateEnd) + 24 * 3600 - 1)); + $userList->getConditionBuilder()->add('user_table.registrationDate < ?', array(strtotime($condition->registrationDateEnd) + 86400)); } if ($condition->registrationDateStart !== null) { $userList->getConditionBuilder()->add('user_table.registrationDate >= ?', array(strtotime($condition->registrationDateStart))); @@ -50,10 +50,10 @@ class UserRegistrationDateCondition extends AbstractSingleFieldCondition impleme * @see \wcf\system\condition\IUserCondition::checkUser() */ public function checkUser(Condition $condition, User $user) { - if ($condition->registrationDateStart !== null && $user->registrationDate < $condition->registrationDateStart) { + if ($condition->registrationDateStart !== null && $user->registrationDate < strtotime($condition->registrationDateStart)) { return false; } - if ($condition->registrationDateEnd !== null && $user->registrationDate > $condition->registrationDateEnd) { + if ($condition->registrationDateEnd !== null && $user->registrationDate >= strtotime($condition->registrationDateEnd) + 86400) { return false; }