WordPress.org

Ready to get started?Download WordPress

Forums

Groups
[resolved] Import Users & batch add to group (5 posts)

  1. jasonkadlec
    Member
    Posted 1 year ago #

    I need to import a few hundred users and then batch add them to a group.

    I know there is a batch add function in the admin - but the problem is that the user table doesn't really filter and sort out of the box. I'll import all these people into a sea of other users.... much easier if I could:

    Create CSV, upload and set either (or both?)
    _groups_buckets
    _groups_product_groups

    Can anyone confirm if

    a. those are the user meta fields used by Groups? (I have the groups add-on for WooCommerce so it could be WooCommerce added them).

    b. If those are how group access is stored for each user, then can anyone point me to something that explains what this structure is doing:

    This is from the _groups_product_groups field for a user with a few groups:
    a:3:{i:807;a:1:{i:803;a:1:{s:6:"groups";a:1:{i:0;s:1:"2";}}}i:805;a:1:{i:803;a:1:{s:6:"groups";a:1:{i:0;s:1:"2";}}}i:987;a:1:{i:818;a:1:{s:6:"groups";a:1:{i:0;s:1:"3";}}}}

    Or is this all stuff from Role Scoper?

    And if so... then back to the original query -- any way to upload a bunch of users and set or update their groups on import?

    http://wordpress.org/extend/plugins/groups/

  2. itthinx
    Member
    Plugin Author

    Posted 11 months ago #

    Did you create a solution for this? I remember you asked me about it and I pointed you to the API https://twitter.com/JasonKadlec/status/319511880374829056 - was it useful?

  3. jasonkadlec
    Member
    Posted 11 months ago #

    I didn't end up using the API...

    I found a Justin Tadlock tutorial on adding custom fields to the users -- I created a field called "Sync"

    Then I found a WP plugin for importing a .csv that allowed for the importation of custom fields.

    Then I found yet another plugin for enabling custom sorting on different fields, including the custom field "Sync."

    So I imported, sorted then used the select all checkbox and then selected the Group and clicked the "Add" button (features at the top of the Users list).

    Hope that makes sense.

    PS -- would still really, really, really REALLY love it if Groups for WooCommerce would be savvy enough to force account creation at checkout.

    By doing so, I could allow most of the checkouts on the site to be "Guest" purchases, unless there is a Groups product present in the cart at the checkout page.

    I'm sure I could write this in... just finding the time as I'm sure you can relate!

  4. itthinx
    Member
    Plugin Author

    Posted 11 months ago #

    Thanks for writing that up Jason, if someone stumbles upon the thread it might help :)

    Oh and about the force account creation at checkout, I've added it to the latest version. Make sure to update and then look at the settings in WooCommerce > Groups.

  5. jasonkadlec
    Member
    Posted 11 months ago #

    Awesome!

    it looks like something may have happened when purchasing your plugin from the get go-- and that may be why I didn't auto get the update...

    anyhow, digging into that matter and hopefully will be having happier customers soon!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.