Announcement

Collapse
No announcement yet.

Need a MySQL query or method to remove Additional usergroup from several users

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a MySQL query or method to remove Additional usergroup from several users

    I have a number of users whose Primary usergroup is a custom usergroup I created.

    Their Additional usergroup is designated as "Registered" which is due to a mistake I made when setting up a new Paid Subscription designation. There are hundreds of them so I'd prefer not to have to do it by hand, etc.

    I would like to keep their primary usergroup the same, but remove the Additional usergroup "Registered" designation for them. I DO NOT want to delete the users themselves.

    So what I'd end up with is that they'd all have the same custom usergroup they currently have but would have NO Additional usergroups checked off for them.

    Can anyone please assist?

  • #2
    This will remove them from every additional usergroup they belong to:
    Code:
    UPDATE user 
    SET membergroupids='' 
    WHERE usergroupid=X
    X is the ID of their primary usergroup.

    Comment


    • #3
      Originally posted by Darkshenron View Post
      This will remove them from every additional usergroup they belong to:
      Code:
      UPDATE user 
      SET membergroupids='' 
      WHERE usergroupid=X
      X is the ID of their primary usergroup.
      Thank you!

      Comment


      • #4
        I've been looking everywhere for this, thank you!

        Comment

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