I need find out how $profileuser->roles is set.

wp_capabilities can hold multiple roles, whereas user-edit role caters only for a single role.

Under certain circumstances it is possible for there to be one or more roles in wp_capabilities but none set in user-edit.

That suggests that there must be another setting used to define user-edit role distinct from wp_capabailities.

In order to import a large batch of of legacy user data with roles set, I need to understand how/where the user-edit setting is stored distinct from wp_capabilities.

The particular circumstance is with syncing between WP users and membership type in CiviCrm. The sync uses mapping between WP user-edit role setting to Civi Membership type. CiviCrm allows multiple membership types per user.

I am using:

  • WP 3.8.1
  • Members plugin 0.2.4
  • CiviCrm plugin 4.4
  • 1
    Hi Richard Padwick, you might be interested in the fact that we are trying to launch a CiviCRM site here at Stack Exchange. Would be great if you could help by going to area51.stackexchange.com/proposals/77367/civicrm and adding yourself as a committer! Cheers, Joe – Joe Murray Nov 13 '14 at 20:13
  • Hi Sven, for clarity of others coming to help, maybe add CiviCRM to title? user-edit not a default wordpress role. – anmari Aug 30 '18 at 6:35
  • I thought third-party plugins were off-topic? Don't get me wrong, this question is interesting and I'd like to see some answers. I'm just asking. – Matthew Brown aka Lord Matt Sep 2 '19 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.