summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Model/GroupMemberModel.php1
-rw-r--r--tests/units/Model/GroupMemberTest.php2
2 files changed, 3 insertions, 0 deletions
diff --git a/app/Model/GroupMemberModel.php b/app/Model/GroupMemberModel.php
index a2077789..ff24777e 100644
--- a/app/Model/GroupMemberModel.php
+++ b/app/Model/GroupMemberModel.php
@@ -60,6 +60,7 @@ class GroupMemberModel extends Base
return $this->db->table(UserModel::TABLE)
->notInSubquery('id', $subquery)
+ ->eq('is_active', 1)
->findAll();
}
diff --git a/tests/units/Model/GroupMemberTest.php b/tests/units/Model/GroupMemberTest.php
index edc9d98c..a296e20e 100644
--- a/tests/units/Model/GroupMemberTest.php
+++ b/tests/units/Model/GroupMemberTest.php
@@ -43,6 +43,8 @@ class GroupMemberTest extends Base
$this->assertEquals(3, $userModel->create(array('username' => 'user2')));
$this->assertEquals(4, $userModel->create(array('username' => 'user3')));
$this->assertEquals(5, $userModel->create(array('username' => 'user4')));
+ $this->assertEquals(6, $userModel->create(array('username' => 'user5')));
+ $this->assertTrue($userModel->disable(6));
$this->assertTrue($groupMemberModel->addUser(1, 1));
$this->assertTrue($groupMemberModel->addUser(1, 2));