Support » Plugin: CiviCRM WordPress Profile Sync » Convering Civi contacts to WP users: Chainging the User Role

  • Resolved databell96

    (@databell96)


    I’ve successfully converted a couple of CiviCRM Members into WP Users after changing the script for ‘CIVICRM_WP_PROFILE_SYNC_BULK’ to true.

    However, these users get automatically stuck with the User Role of Subscriber and I have a number of custom roles I want the users I’m covert to use one of those instead. Like ‘USA Member’, for example.

    Is there a place in the script where I might be able to make this alteration?

    https://wordpress.org/plugins/civicrm-wp-profile-sync/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Christian Wach

    (@needle)

    To repeat what I said in your other support thread, this functionality is specifically flagged as a tool for developers and therefore I don’t generally provide support for it.

    The bulk ops user creation process calls wp_insert_user() so you should be able to use the user_register hook and amend the user role to whatever you want it to be.

    I think the reason they get stukc with the Subscriber role in wp is because it is the default role for new users in wordpress.

    I want to safely asssume that if you chamge the wp default role for new users to the one you have created then new wp users create will assume that role

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Convering Civi contacts to WP users: Chainging the User Role’ is closed to new replies.