ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Changing Assigned Group

October 12, 2008 11:45am

Subscribe [1]
  • #1 / Oct 12, 2008 11:45am

    SNE

    18 posts

    How do I re-assign users (in bulk) to another member group? Doing one-at-a-time isn’t an option.

  • #2 / Oct 12, 2008 12:09pm

    Robin Sowell

    13255 posts

    There isn’t a stock way to mass switch their groups.  Though I think it would make a good feature request- perhaps it could be added as a dropdown option in the ‘View Member’ page- in addition to the current ‘delete’ option.

    That said, it wouldn’t be difficult to do directly via mysql.  However, I’ll move this over to ‘How to’ if you are comfortable going that route.  You’d definitely want to make a backup of your exp_members table before going forward that way.  And how you’d approach it depends on the specifics.  For example, switching everyone in one member group to a different member group would be very easy- just a query in the db query form.  However, if you want to apply it to specific members, the query would be a bit more complex.

    Who needs switching- a whole group, or a list of members?

  • #3 / Oct 12, 2008 12:19pm

    SNE

    18 posts

    Hey Robin.

    A whole group needs to be switched.

  • #4 / Oct 12, 2008 12:33pm

    Robin Sowell

    13255 posts

    😉  Well, that makes things easy.  But seriously- go make a good backup of your exp_members table before doing anything.  Without it, if something goes wrong, you’re in trouble.

    Then you just need to switch the group ids around.  The basic query can be done in phpmyadmin, or in ‘Admin- Utilities- SQL Manager- DB Query form’.

    UPDATE exp_members SET group_id=5 WHERE group_id=7

    To things you have to be really sure about.  The current group id of the members you want to switch and the group_id you want to switch them to.  In the above example, the current id you want switched is the ‘7’ and the one you’re moving them to is the ‘5’.

    Does the above make sense?  If you have any doubts, uncertainties, need help figuring out the id- anything?  Ask, and I’ll walk you through it.

    Make sense?

  • #5 / Oct 12, 2008 12:36pm

    SNE

    18 posts

    Makes perfect sense. Thanks for the feedback/help.

  • #6 / Oct 12, 2008 12:55pm

    Robin Sowell

    13255 posts

    Let me know how it goes- I’ll be keeping an eye out until I’m sure everything went ok.  Have to be careful with direct database manipulation.

  • #7 / Oct 12, 2008 12:58pm

    SNE

    18 posts

    Done…without a hitch. Thanks.

  • #8 / Oct 12, 2008 1:29pm

    Robin Sowell

    13255 posts

    Glad that worked smoothly 😊.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases