Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
I have two classes of membership to deal with: ordinary members, and committee members. I'd like to be able to send emails by class of user - so a general email goes to all members, but committee business goes only to committee members.

I'm using Extended Users, and the ordinary members are set as 'authenticated user', committee members are set as 'authenticated user (special)'.

So I need to build a list of email addresses from the list of extended users. This code builds a list of email addresses for all users, adding commas between them:

Code: Select all
<cms:set email_list='' scope='global'/>
<cms:set email_count='0' scope='global'/>
<cms:pages masterpage="users/index.php">
  <cms:if email_count gt '0'>
     <cms:set email_list="<cms:show email_list />," scope='global'/>
  </cms:if>
  <cms:set email_list="<cms:show email_list /> <cms:show extended_user_email />" scope='global'/>
  <cms:set email_count="<cms:add email_count '1' />" scope='global'/>
</cms:pages>


So all I need now is to filter on the access level of the extended user. What field name contains that information?
No field contains that information, unfortunately. Maybe it is a good idea to add this variable. If you also think so please ping @KK about it. Meanwhile some workaround should be invented.

My suggestion is to have all users as 'Authenticated user' and add a custom dropdown - regular user / committee member. Next, filter users by custom_field param - custom_field="role==regular", where 'role' is a name of imaginary dropdown editable. Can you try that?
For curious minds, there is a workaround to add access_level info in context of cms:pages tag.
It certainly does! Thanks, once again, @trendoman.
daldred wrote: It certainly does! Thanks, once again, @trendoman.

Great :)
5 posts Page 1 of 1