christianwach / civicrm-wp-member-sync

CiviCRM WordPress Member Sync plugin keeps a WordPress user in sync with a CiviCRM membership by granting either a role or capabilities to a WordPress user who has that membership.
https://wordpress.org/plugins/civicrm-wp-member-sync/
GNU General Public License v2.0
17 stars 10 forks source link

no new user account email notification #47

Closed lcdservices closed 9 months ago

lcdservices commented 1 year ago

I've discovered a few things in implementing this plugin recently that is not well documented, and I'm trying to understand the intention.

First, we found that new memberships will trigger the creation of a new user account if one does not exist. The manual synchronize settings page provides an option to create new user accounts. What's not clear is that the normal course of synchronization will always create a new user account (if one does not exist) -- there is no config option to control that.

Secondly, it appears that although a new user account is created, the user is not notified via the standard WP email. The wp_create_user() function references a hook that can be used to trigger wp_new_user_notification(), but it seems odd that it's not simply done automatically as is the case with most other new user creation tasks.

Anyway, before I work on modifications for this client, I wanted to see if I'm missing anything, and what the rationale was for these decisions.

christianwach commented 1 year ago

First, we found that new memberships will trigger the creation of a new user account if one does not exist. The manual synchronize settings page provides an option to create new user accounts. What's not clear is that the normal course of synchronization will always create a new user account (if one does not exist) -- there is no config option to control that.

Config is via this filter.

Secondly, it appears that although a new user account is created, the user is not notified via the standard WP email. The wp_create_user() function references a hook that can be used to trigger wp_new_user_notification(), but it seems odd that it's not simply done automatically as is the case with most other new user creation tasks.

There are many ways to do this (via CiviCRM or WordPress) so it is left to others to implement in their chosen manner.