Fix: Hide unapproved member activities

This commit is contained in:
Lucas Bartholemy 2018-09-29 15:49:37 +02:00
parent 7698d9ccf1
commit 79dad8e3b6
3 changed files with 6 additions and 2 deletions

View File

@ -13,7 +13,7 @@ Yii::setAlias('@themes', '@webroot/themes');
$config = [
'name' => 'HumHub',
'version' => '1.3.4',
'version' => '1.3.5-pre',
'basePath' => dirname(__DIR__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR,
'bootstrap' => ['log', 'humhub\components\bootstrap\ModuleAutoLoader', 'queue', 'humhub\modules\ui\view\bootstrap\ThemeLoader'],
'sourceLanguage' => 'en',

View File

@ -1,10 +1,12 @@
HumHub Change Log
=================
1.3.5 (September 25, 2018)
1.3.5 (Unreleased)
---------------------------
- Fix: Serialization of notifications without originator fails
- Fix: Hide unapproved member activities
1.3.4 (September 25, 2018)
---------------------------

View File

@ -9,6 +9,7 @@
namespace humhub\modules\activity\actions;
use humhub\modules\stream\actions\ContentContainerStream;
use humhub\modules\user\models\User;
class ActivityStreamAction extends ContentContainerStream
{
@ -22,6 +23,7 @@ class ActivityStreamAction extends ContentContainerStream
if ($this->activity) {
$this->streamQuery->channel(static::CHANNEL_ACTIVITY);
if ($this->streamQuery->user) {
$this->streamQuery->query()->andWhere(['!=', 'user.status', User::STATUS_NEED_APPROVAL]);
$this->streamQuery->query()->andWhere('content.created_by != :userId', [':userId' => $this->streamQuery->user->id]);
}
}