Forums

Mass change of user levels (8 posts)

  1. shadow
    Moderator
    Posted 4 years ago #

    I have just spent the best part of a week adding new users to a WP site. Over 400 in fact. This is used in a school situation and the children are given a level of 2 and adults are given a 9.

    Ading the names was a big enough task. Now I am finding the next step to be huge. Each time you click on promote it jumps back to the top of the list - scroll down - and click again - 9 times for adults. Is there an easier way. In phpmyadmin perhaps?

  2. macmanx
    Member
    Posted 4 years ago #

    Yes, I've heard that you can do that by editing some values in the wp_users table, but I'm not sure how to exactly and there are no tutorials.

  3. shadow
    Moderator
    Posted 4 years ago #

    Thanks macmanx.

    That's a pity - it would be nice to be able to just click on a whole set of names and do the whole lot in one go. Oh well, life wasn't meant to be easy I guess :)

  4. IanD
    Member
    Posted 4 years ago #

    Looking at my phpmyadmin, the user level is set in user_level in the wp_users table. So you should be able to write a query to change the levels of the users you select. I am sure someone knows how to do that.
    Edited: this is the post I was looking for:
    http://wordpress.org/support/topic.php?id=8545#post-63292

  5. shadow
    Moderator
    Posted 4 years ago #

    Thanks IanD.

    Yes, that looks like it may be a way in but I am not sure how I would go about writing a query which would edit a whole set of users at one time.

    The trouble is, too, I have about 50 to change to 9 and 350 odd to change to 2 and they are not in an easily identifiable [ID] order.

    I will most likely have to do all these manually this time but perhaps I can work it all out before I ever have to do it again.

    Thanks for the suggestions :)

  6. IanD
    Member
    Posted 4 years ago #

    Just a thought - I am guessing that there a query to change ALL to level 2, then you could do the level 9s by hand. At least that way you should save a bit of time.

  7. shadow
    Moderator
    Posted 4 years ago #

    Sounds like a good suggestion IanD. I will look into it :) Thanks.

  8. IanD
    Member
    Posted 4 years ago #

    Ok , so running this sql query works on my local setup:

    SELECT * FROM wp_users WHERE 1;
    UPDATE wp_users SET user_level='2';

    [this is the first sql thing I have ever done, so you might want to see a resident sql guru has a better idea :) ]

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.