Code Duplication    Length = 11-20 lines in 2 locations

src/Pages/Forum.php 1 location

@@ 160-179 (lines=20) @@
157
            return true;
158
        }
159
160
        if ($member = Member::currentUser()) {
161
            if ($member->IsSuspended()) {
162
                return false;
163
            }
164
            if ($member->IsBanned()) {
165
                return false;
166
            }
167
168
            if ($this->CanPostType == "LoggedInUsers") {
169
                return true;
170
            }
171
172
            if ($groups = $this->PosterGroups()) {
173
                foreach ($groups as $group) {
174
                    if ($member->inGroup($group)) {
175
                        return true;
176
                    }
177
                }
178
            }
179
        }
180
181
        return false;
182
    }

src/Pages/ForumHolder.php 1 location

@@ 217-227 (lines=11) @@
214
            return true;
215
        }
216
217
        if ($member) {
218
            if ($member->IsSuspended()) {
219
                return false;
220
            }
221
            if ($member->IsBanned()) {
222
                return false;
223
            }
224
            if ($this->CanPostType == "LoggedInUsers") {
225
                return true;
226
            }
227
228
            if ($groups = $this->PosterGroups()) {
229
                foreach ($groups as $group) {
230
                    if ($member->inGroup($group)) {