Print Page | Close Window

MOD: Allow Moderators to update user's Group

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=22194
Printed Date: 30 March 2026 at 12:10pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: MOD: Allow Moderators to update user's Group
Posted By: MrMellie
Subject: MOD: Allow Moderators to update user's Group
Date Posted: 13 December 2006 at 3:49pm
Hi all, I installed WWF for the first time yesterday on a local test system and have been delving into the code already!

On my site, there is a requirement for moderators to be able to give paid up club members access to a private forum area. As I'd sussed that forum access is done by Groups in WWF, and I found only the Admin can change a user's group, I decided to do this MOD otherwise I'd be the only one able to change a users group!

So, in register.asp:

Find the code at line 1956:
             'Only allow admin to change the member group

             If blnAdmin Then

                    'Get the forum groups from the database so admin can change the members group

                     'Initlise SQL query
                     strSQL = "SELECT " & strDbTable & "Group.Group_ID, " & strDbTable & "Group.Name, " & strDbTable & "Group.Special_rank, " & strDbTable & "Group.Minimum_posts " & _
                     "FROM " & strDbTable & "Group" & strDBNoLock & ";"


Then at line 1965 insert the following code:

            Else

                    'Get the forum groups from the database so moderator can change the members group (limited groups available)

                     'Initlise SQL query
                     strSQL = "SELECT " & strDbTable & "Group.Group_ID, " & strDbTable & "Group.Name, " & strDbTable & "Group.Special_rank, " & strDbTable & "Group.Minimum_posts " & _
                     "FROM " & strDbTable & "Group" & strDBNoLock & " WHERE GROUP_ID > 3;"
            End If     


Finally, at line 2022, remove or comment out the End if statement. That's it!!

To prevent a moderator promitng himself to admin status or any other use to moderator or admin, the new select statement filters out the admin, guest and moderator groups from the dropdown list. If you don't mind a moderator doing promotions to moderator simple change the where clause to GROUP_ID > 2.

Having done a lot of modding in Snitz before, I must say I'm very impressed with the code layout in WWF, very easy to find what you want. Thanks to all those involved in writing it!

Cheers!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net