Topic RSS
Related Topics
Can someone pioint me to the easiest wey to find all the users that have a specific permission in a specific forum (for example that have the "can subscribe" permission knowing only the forum ID?
If I got the SImplePress DB structure it's look like the following:
1. in sf_roles table looks for roles that have the "can subscribe" option turned on (what identify an option on or off?). Then returns the roles id
2. in sf_permissions looks for permission_role = one of the roles_id we got in (1) and forum_id = the form id we got from the beginning. Returns usergroups_id
3. in sf_membership looks for usergroup_id = one of the usergroups_id we got in(2). Returns the list of users_id
Is the right procedure?
Does exists some SF function that "wrap" any of these steps or part of it?
If you do want to know the whole story (i.e. "why do you want to do that) here it is:
We need to notify via email all the users "enrolled" in a specific private forum (aroun 15/20 people) when one of our editors publish a blogpost linked to the forum.
So we added some code to sf_publish_blog_link() function to send that email…
…but we need to know the users email … we choose to notify only the users taht have "can_subscribe" permission…
But my knowledge of SimplePress is limited so I'm asking your help…
Thanks!
Stefano
P.S.
We are stuck in the 4.1.3 version… no options to upgrade.
Most Users Ever Online: 444
Currently Online: SPQC, joelrob
56 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 502
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2626
Members: 7363
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10898
Posts: 79583
Newest Members: Rick Thomas, joelrob, ndc, MacBravO, irlandes1, triphop, betokan, Jonathan Yovani Muñoz, somosguatemala, ahcreate
Moderators: Brandon C (162)
Administrators: Yellow Swordfish (22240), Mr Papa (23688)
Log In
Register
Home
Add Reply
Add Topic
Offline
Quote




Visit 
Privacy Policy



