mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix #2555: Friendship notification category visible even if friendship system deactivated
This commit is contained in:
parent
7d1a321767
commit
a928988195
@ -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)
|
||||
--------------------------------
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user