Quick way to add all members to a membergroup?

Started by khamseen, July 15, 2015, 08:47:10 PM

Previous topic - Next topic

khamseen

I'm reworking our sites membergroups to try and make life easier in the long run, but I'm wondering if there's a quick way to add all members to a group?
I don't want to adjust their primary membergroups as those come with insignias and varying permissions, I just want to add a new secondary membergroup to all existing members. I know it's possible to delete all members from a group, but the only way I've found of adding them is via their profile or by typing in each and every name which will take me hours.
"In hope we find despair and in despair we find truth." - Myself

Jade Elizabeth

Go to the moderation centre and click on "view membergroups" then click the name of the membergroup, and you can add them. Be sure to set this to "invisible" first in the membergroups settings and it will add it as a secondary group, and you can always change it back to not invisible later if that makes sense :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

khamseen

Hey, thanks for the reply.
The issue with that though is it looks to be the exact same as trying to do it via the main membergroup page in the admin panel. I have to manually enter every users name and then click "add". I just want a way to add this membergroup to all current accounts to save me 200+ names getting typed out.
"In hope we find despair and in despair we find truth." - Myself

Jade Elizabeth

You don't have to press add after each one, you just click their name and keep going :). I do this a lot actually so it took me a while to figure that out! :-[

Anyway....do any of the members have secondary groups at the moment other than this one? If you go into phpmyadmin you can click the members table and align it by "additional_groups" to see if there's any other group id coming up...if not you can easily run a query for this.

UPDATE  `<prefix>_members` SET  `additional_groups` =<membergroup id>

If there is you might have to select only those with empty fields and then manually do the rest...(by using this one and taking down the other names)

UPDATE  `<prefix>_members` SET  `additional_groups` =<membergroup id> WHERE  `additional_groups` =''

And you're quite welcome for the help, any time :D.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

khamseen

Ah ok, you know I've been using SMF for nearly a decade and I never knew you could add more than one name at a time that way! Thanks for that info. :)

Some of them do have additional secondary membergroups, though not nearly as many have those as the full number I want in this particular group so I may go through and clear out those groups and then run the SQL query and manually add the few who need additional secondary groups back in via the moderation centre.

Thanks again. :)
"In hope we find despair and in despair we find truth." - Myself

Jade Elizabeth

Yeah I found out by accident ha ha. It's a new 2.0 feature, called auto complete I believe! But I always wanted to type a whole list of names and click add....problem is it doesn't always add the names from a list if it can't confirm each one for some reason...so it's best to click on them one by one because then the system knows for sure it's that name. I wouldn't do more than 20 in a list to add though, it might become too big and time out, I'm unsure!

You wont need to clear them out if you use the first query, it will replace all additional groups. Just maybe take some screenshots of the group lists OR the numbers in the columns for each member....then you can just add them in by hand later :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

khamseen

Well I ran the query and got them all added without a hitch, so that's something. :)

Though as I was browsing the mods page looking for something unrelated (a 'years of service' style display for user posts) I stumbled upon this! Figured I'd post it here in case it was of any use to yourself or anybody else who comes across this thread when looking for a similar thing.
"In hope we find despair and in despair we find truth." - Myself

Jade Elizabeth

Oh wow that is BRILLIANT!! What a perfect and wonderful find!!!!

Genius mod!! :D
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: