Browse code

- Update template mod_memberReader - Check for member groups was adjusted

doishub authored on08/12/2020 16:31:08
Showing2 changed files
... ...
@@ -63,14 +63,17 @@ class ModuleMemberList extends ModuleMemberExtension
63 63
 	 */
64 64
 	protected function compile()
65 65
 	{
66
-        $objGroups = MemberModel::findByGroups($this->groups);
66
+        $objGroups = MemberModel::findAll();
67
+        $arrGroups = StringUtil::deserialize($this->groups);
67 68
         $arrMembers = null;
68 69
 
69 70
         if($objGroups->count())
70 71
         {
71 72
             while($objGroups->next())
72 73
             {
73
-                if($objGroups->disable)
74
+                $memberGroups = StringUtil::deserialize($objGroups->groups);
75
+
76
+                if($objGroups->disable || empty($arrGroups) || !\is_array($arrGroups) || !\count(array_intersect($arrGroups, $memberGroups)))
74 77
                 {
75 78
                     continue;
76 79
                 }
... ...
@@ -4,4 +4,8 @@
4 4
 
5 5
 <?=$this->member?>
6 6
 
7
+<!-- indexer::stop -->
8
+<p class="back"><a href="<?= $this->referer ?>" title="<?= $this->back ?>"><?= $this->back ?></a></p>
9
+<!-- indexer::continue -->
10
+
7 11
 <?php $this->endblock(); ?>