News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Move all users to a new groupTh

Started by peppe, October 09, 2013, 01:05:08 PM

Previous topic - Next topic

peppe

Hi.

I've a 1.1.18 SMF board with around 2500 registered users.

Now I want that all registered users will come to a new user group that I will create.


How can I do it without modifying their profile one by one??


Thank you very much for your reply! :)
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

margarett

How many primary membergroups do you have? Don't some of those users have a membergroup assigned already (other than post count groups)?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

the only realistic way to do this would be to use a direct SQL edit...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

Yup, that's why I was trying to understand what is the actual "state of things".
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

I don't get why there is a need to move anyone, if it's permissions, use Registered Members or post count groups, if it's anything else it's likely for display purposes only.

In any case I wouldn't be too concerned about 1.1.x, I'd be more concerned about planning an upgrade since 1.1.x will not be supported forever.
Holder of controversial views, all of which my own.


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

peppe

All my users are in one group, registered members by default.
Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

margarett

That's not entirely true. You and other administrators are in a different group :)

I'm not on the computer and I don't remember the database schema for 1.1.x but you are looking at something like:
UPDATE smf_members
SET id_group = 99
WHERE id_group =0

Now... You need to check both the table and column names because I'm not on the computer...

Oh, and of course you'll backup first, right? ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

peppe

Tutte le news sulla laurea in giurisprudenza e su esame da avvocato

Arantor

@margarett Just FYI, the schema on this subject is basically unchanged. The only difference is that the column is capitalised in 1.1, being ID_GROUP to signify it is a foreign key (as key constraints aren't actually used in the code), but MySQL isn't case sensitive.

On a related note, additional_groups in 2.0 is additionalGroups in 1.1 if that's needed here.
Holder of controversial views, all of which my own.


margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: