From e804330218839fd732d0284ad9e95fee207959cf Mon Sep 17 00:00:00 2001 From: Cam Findlay Date: Thu, 29 Oct 2015 21:41:50 +1300 Subject: [PATCH] FIX If grant_user_access is set then return filtered list I think there is a bug here in that a config value doesn't actually filter the returned Members. This causes a problem on large sites with 1000's of users as it returns them all and you often run into a out of memory problem. I should be able to set a permission value which qualifies a list of appropriate users that can manage blog roles. Is it as simple as reversing the conditional? --- code/model/Blog.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/model/Blog.php b/code/model/Blog.php index 2d07901..5dfc0bd 100644 --- a/code/model/Blog.php +++ b/code/model/Blog.php @@ -360,11 +360,11 @@ class Blog extends Page implements PermissionProvider { */ protected function getCandidateUsers() { if($this->config()->grant_user_access) { - return Member::get(); - } else { return Permission::get_members_by_permission( $this->config()->grant_user_permission ); + } else { + return Member::get(); } }