From 64571a65ddf7cebf092812a73ca9f6e5ebc8c364 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 24 May 2014 12:57:11 +0200 Subject: [PATCH] Fix return values of showNotice methods for guests --- .../files/lib/system/condition/UserEmailCondition.class.php | 2 +- .../system/condition/UserRegistrationDateCondition.class.php | 2 +- .../condition/UserRegistrationDateIntervalCondition.class.php | 2 +- .../files/lib/system/condition/UserStateCondition.class.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/condition/UserEmailCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserEmailCondition.class.php index f441422e67..3577271bbf 100644 --- a/wcfsetup/install/files/lib/system/condition/UserEmailCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserEmailCondition.class.php @@ -44,7 +44,7 @@ class UserEmailCondition extends AbstractTextCondition implements INoticeConditi * @see \wcf\system\condition\INoticeCondition::showNotice() */ public function showNotice(Condition $condition) { - if (!WCF::getUser()->userID) return; + if (!WCF::getUser()->userID) return false; return $this->checkUser($condition, WCF::getUser()); } diff --git a/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php index 97070225b7..3d49620c3c 100644 --- a/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserRegistrationDateCondition.class.php @@ -154,7 +154,7 @@ HTML; * @see \wcf\system\condition\INoticeCondition::showNotice() */ public function showNotice(Condition $condition) { - if (!WCF::getUser()->userID) return; + if (!WCF::getUser()->userID) return false; return $this->checkUser($condition, WCF::getUser()); } diff --git a/wcfsetup/install/files/lib/system/condition/UserRegistrationDateIntervalCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserRegistrationDateIntervalCondition.class.php index 0d41d86d50..670683f1d4 100644 --- a/wcfsetup/install/files/lib/system/condition/UserRegistrationDateIntervalCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserRegistrationDateIntervalCondition.class.php @@ -91,7 +91,7 @@ class UserRegistrationDateIntervalCondition extends AbstractIntegerCondition imp * @see \wcf\system\condition\INoticeCondition::showNotice() */ public function showNotice(Condition $condition) { - if (!WCF::getUser()->userID) return; + if (!WCF::getUser()->userID) return false; return $this->checkUser($condition, WCF::getUser()); } diff --git a/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php b/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php index e2cfffab69..56d3224777 100644 --- a/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php +++ b/wcfsetup/install/files/lib/system/condition/UserStateCondition.class.php @@ -196,7 +196,7 @@ HTML; * @see \wcf\system\condition\INoticeCondition::showNotice() */ public function showNotice(Condition $condition) { - if (!WCF::getUser()->userID) return; + if (!WCF::getUser()->userID) return false; return $this->checkUser($condition, WCF::getUser()); } -- 2.20.1