diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index 86e1fcc375..013f24945d 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -21,6 +21,7 @@ HumHub Change Log - Fix: Invite Users does not respect ManageUsers/ManageGroups permission - Fix: Mail summaries sent in incorrect language - Fix: Send button text on request space membership dialog +- Fix #2555: Friendship notification category visible even if friendship system deactivated 1.2.0 (April 16, 2017) -------------------------------- diff --git a/protected/humhub/modules/friendship/notifications/FriendshipNotificationCategory.php b/protected/humhub/modules/friendship/notifications/FriendshipNotificationCategory.php index e2a1132c37..cfc52b1264 100644 --- a/protected/humhub/modules/friendship/notifications/FriendshipNotificationCategory.php +++ b/protected/humhub/modules/friendship/notifications/FriendshipNotificationCategory.php @@ -8,6 +8,7 @@ namespace humhub\modules\friendship\notifications; +use humhub\modules\user\models\User; use Yii; use humhub\modules\notification\components\NotificationCategory; use humhub\modules\notification\targets\BaseTarget; @@ -61,4 +62,12 @@ class FriendshipNotificationCategory extends NotificationCategory return $target->defaultSetting; } + /** + * @inheritdoc + */ + public function isVisible(User $user = null) + { + return Yii::$app->getModule('friendship')->getIsEnabled(); + } + }