WordPress.org

Ready to get started?Download WordPress

Forums

Find and add user metadata in database (5 posts)

  1. juri003
    Member
    Posted 2 years ago #

    Hi all,

    At the moment I am working on a project involving user profiles and user management. I use several plugins that add values to users but they do not have options to add that data in bulk actions. Because I have 230 users I really can't edit the data one by one.

    So, as I did with other data stored in wp_usermeta by other plugins, I would like to import the data directly in my database with phpmyadmin.

    The strange thing is however I can't find the meta-key for those functions... does anybody have tips on how to find it or where it could be stored.. or maybe other ways to mass import that kind of data?

    The 2 plugins with the data are:

    1. User Acces Manager - Add users to groups with custom rights. When you edit a user the existing groups appear at the bottom in checkbox options
    2. Mailpress - Allows you to create mailinglists to which users can subscribe. The plugin has it's own user management imported from wp-users. In the user edit screen you can select the available list

    I am curious about you experience in importing values directly in the databases.

  2. juri003
    Member
    Posted 2 years ago #

    Any tips on finding the meta keys in the database?

  3. vjpo
    Member
    Posted 2 years ago #

    Your question is more about SQL then WP.
    If you want to mass edit users through WP functionality, you need custom PHP script/ WP plugin for that (may be some suitable plugin had written already).
    All WP functions those work with wp_usermeta table you can find here
    http://codex.wordpress.org/Function_Reference#User_and_Author_Functions
    Especially in the User meta section: add_user_meta , update_user_meta etc.
    It seems a script must create the array of users through get users function and then update meta data user by user in loop. May be this thread can be helpful
    http://wordpress.stackexchange.com/questions/5785/change-user-role-after-bulk-import

  4. vjpo
    Member
    Posted 2 years ago #

  5. juri003
    Member
    Posted 2 years ago #

    Hey VJPO,

    Thanks For the tip, that's great!

    I used your tip to see if the specific plugins define the database location with the functions from the codex. Unfortunately that didn't lead to the right location and I am not able to write my own plugins. But I did find them through other searches!

    If anyone needs to know post it or contact me.

Topic Closed

This topic has been closed to new replies.

About this Topic