CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Memberships to create Wordpress Users
Pages: [1]

Author Topic: Memberships to create Wordpress Users  (Read 1342 times)

nvg

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • Currently wrkng on new site for greenlane-sbn.org
    • Net Visibility Group
  • CiviCRM version: 4.3.5
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.63
  • PHP version: 5.3.15
Memberships to create Wordpress Users
July 12, 2013, 03:39:49 pm
I've ported an existing install from Drupal to Wordpress, have imported all data & all is working well, except that I need to:

  • Create Wordpress users for existing Memberships
  • Have Wordpress users created when Memberships are signed up and paid for, so that users can log in and renew their Memberships

and am not sure how to do this. I know I could do some SQL work for the existing users, etc., but is there and easier way?
And I don't know how to get CiviCRM to create Wordpress users as Memberships are created.

CiviCRM and Wordpress are using separate databases.

Many thanks for any advice.


krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Re: Memberships to create Wordpress Users
July 15, 2013, 05:22:27 am
For #1, we imported them all into WP with a modified version of the WordPress CSV User Import plugin. We threw in:

civicrm_user_register( $user_id );

during the import process, so it went and searched Civi for the email address of the imported user and tied them together appropriately. Imported about 20k users that way.

#2 - I don't know a clever way to do this. I wish there were - and I don't think it'd be too difficult (the WP/Civi APIs can easily handle that stuff) - but coding it is a bit beyond me, sadly.

EDIT: I'm assuming you mean you want to create users when memberships are created manually in the back-office. If you want to automatically create WP users when someone signs up through the website, you can set that option on the profile you use on the membership signup page.
« Last Edit: July 15, 2013, 05:30:55 am by krypto »

nvg

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • Currently wrkng on new site for greenlane-sbn.org
    • Net Visibility Group
  • CiviCRM version: 4.3.5
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.63
  • PHP version: 5.3.15
Re: Memberships to create Wordpress Users - User Role Synchronization
July 15, 2013, 09:40:05 am
Thanks for getting back to me on this krypto  ;)

I do have a web form working that's creating memberships properly after the PayPal status comes back as completed, but not creating WP users/logins for them.

The next step for me is to keep Wordpress user roles synched up with membership statuses as close to real time for access purposes & membership renewals.

After some more googling I found a plugin which looks like it does exactly what I'm looking for:
Wordpress-CiviCRM-Member-Role-Sync (search on GitHub, it's not in the WP plugins area & it looks like new users can't post links here)

There's probably another way of doing this with Civi using it's roles & access methods (?), but I have more experience with Wordpress customization so I think this will work well for me using WP logins and page access. If there's an easier way of doing this that someone knows of I'd love to hear a bit about it, enough to point me in the right direction.

I'll try to remember to post an update on how this WP role synching plugin works after I test it in case it's something that could be useful to someone else doing a search on this.

Thanks again!

krypto

  • I post occasionally
  • **
  • Posts: 69
  • Karma: 5
  • IT guy for @bhahumanists. Running Civi on WP.
    • British Humanist Association
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.x
  • MySQL version: 5.5.x
  • PHP version: 5.5.x
Re: Memberships to create Wordpress Users
July 15, 2013, 09:46:25 am
That's odd - is the 'Wordpress user account creation' option set correctly in the profile's advanced settings? Bear in mind it only appears in the form if you're not logged in - this baffled me for hours as I recall.

Yep, that plugin was written for us. Works pretty well* and I recommend it. I use it with Capability Manager Enhanced to sync membership to WordPress roles.

*currently it's only syncing on logout, so sometimes users have to logout and back in for the system to realise they're a member. Currently unclear whether this is a plugin issue or something else in our WP setup, though, so don't let it put you off.

nvg

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • Currently wrkng on new site for greenlane-sbn.org
    • Net Visibility Group
  • CiviCRM version: 4.3.5
  • CMS version: Wordpress 3.5.1
  • MySQL version: 5.1.63
  • PHP version: 5.3.15
Re: Memberships to create Wordpress Users
July 16, 2013, 10:28:52 am
Ok, yes your right, it was a combination of being logged in and also not having the "allow anyone to register" option set in WP general settings  ::)
Got the user roles all working properly now. Many thanks for shining the light on that krypto!

I only have one sticky wicket left, but I think I should probably put that in a new topic since it's unrelated to user roles..  thanks again!
« Last Edit: July 16, 2013, 11:24:45 am by nvg »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Memberships to create Wordpress Users

This forum was archived on 2017-11-26.