From 7df900ce4285c7f2b338828f212ac37e78ece4c1 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 13 May 2014 22:34:27 +0200 Subject: [PATCH] Fix checks in UserRegistrationDateCondition --- .../condition/UserRegistrationDateCondition.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.20.1