Skip to content

Commit

Permalink
- Update template mod_memberReader
Browse files Browse the repository at this point in the history
- Check for member groups was adjusted
  • Loading branch information
doishub committed Dec 8, 2020
1 parent 746fedd commit 99b4d5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Resources/contao/modules/ModuleMemberList.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ public function generate()
*/
protected function compile()
{
$objGroups = MemberModel::findByGroups($this->groups);
$objGroups = MemberModel::findAll();
$arrGroups = StringUtil::deserialize($this->groups);
$arrMembers = null;

if($objGroups->count())
{
while($objGroups->next())
{
if($objGroups->disable)
$memberGroups = StringUtil::deserialize($objGroups->groups);

if($objGroups->disable || empty($arrGroups) || !\is_array($arrGroups) || !\count(array_intersect($arrGroups, $memberGroups)))
{
continue;
}
Expand Down
4 changes: 4 additions & 0 deletions src/Resources/contao/templates/modules/mod_memberReader.html5
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

<?=$this->member?>

<!-- indexer::stop -->
<p class="back"><a href="<?= $this->referer ?>" title="<?= $this->back ?>"><?= $this->back ?></a></p>
<!-- indexer::continue -->

<?php $this->endblock(); ?>

0 comments on commit 99b4d5b

Please sign in to comment.