No announcement yet.

Mass add users to multiple groups

  • Filter
  • Time
  • Show
Clear All
new posts

  • Mass add users to multiple groups

    Hello everyone. I have a quick question that I have not stumbled across an answer for yet.

    I run a vb board for a school an our memberlist changes every semester. I've got the impex working so I can import lists of students or staff each semester. I then do a move/prune to put them into a custom group called students. Is it possible to mass add the students into the await email group and have them remain in the student group? I though I would have the await email as a secondary group, but I can't seem to find an option to change all their settings at once. Maybe I skipped over something?

    Now If I do this what happens if they confirm the email? Do they just stop being a member of the await email group or do they get moved to the registered users group? Would they still retain the membership of the student group?

  • #2
    Secondary groups can only add permissions, and it sounds like you are wanting to restrict access through the secondary group until the users verify their emails. They need to be a primary member of that group.


    • #3
      Ok, I thought you might say that.

      Next question. If I go ahead and put all the students in the await email group when they comfirm they will be put into the registed users group. Is that correct? Is there a way I can make them go into the student group instead?

      If not, how do I add whole bunch of users to a secondary group at the same time?


      • #4
        Yes, email confirmations put users into the registered group. Setting a different target group requires modifying the files since the usergroupids are hardcoded. I recommend you use the default registered group as the student group.

        There is no feature to mass add users to secondary groups. You can probably do this with a query, but secondary groupids are stored as a comma list and I don't know the appropriate query.


        • #5
          If the secondary users are stored in a comma file somewhere that would work fine. I would just need to modify the text file I use for importing a little bit. Actually now that I think about it, it affects all users doesn't it. Even so, that shouldn't be to hard to work around.

          My goal was to have faculty/staff and students in 2 separate groups and try and keep the comfirm email working. In theory if I have all of this right.

          I can do an import and put all the users into the await email group.

          They respond and go to the registered group

          I should be able to find and modify a text file somewhere in vbulletin that contains all the secondary group assignments for all of the users. By editing the text file I should be able to mark who is a student vs. staff.

          So the next time I do an import this text file will have blank fields for the students that I imported that don't have a secondary group assigned yet.

          Then I should be able to just do a search and replace to make all students that have a blank field now have a student field.

          Does this sound possible or am I trying to make the VB software do to much?


          • #6
            You can always add a user to a secondary group by editing their profile in the Admin CP. Mass updating requires a query to manipulate the stored value which is a comma list. That is what I don't know how to do.


            • #7
              Is the comma list your speaking of just a file that's kicking around in a directory somewhere? I should be able to edit it in notepad or something similar.

              I looked at the user profiles when I started this process, then I realized I'd have to update each student by hand. I was trying to avoid that as it would take quite a while.


              • #8
                In the user.membergroupids field in the database.


                • #9
                  found an easy way to mass add

                  This worked for me anway. Since I'm importing users all the time thru impex they have a activity date of 1969. I used the promotion tool under the user section to promote everyone who had a join last activity date over 10 years ago. This let me add them to a secondary group after i was done importing them.


                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.