Answers.Body: <p>You can unhook CiviCRM's hook callbacks like this:</p>
  
  <pre><code>add_action( 'plugins_loaded', 'my_disable_civi_user_sync' );
  function my_disable_civi_user_sync() {
      if ( ! function_exists( 'civi_wp' ) ) return;
      remove_action( 'user_register', array( civi_wp()-&gt;users, 'update_user' ) );
      remove_action( 'profile_update', array( civi_wp()-&gt;users, 'update_user' ) );
      remove_action( 'deleted_user', array( civi_wp()-&gt;users, 'delete_user_ufmatch' ), 10 );
  }
  </code></pre>
  
  <p>Disclaimer: this is untested code. You may need to hook into a later action, e.g. <code>init</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-12T15:58:25.350Z
Answers.LastActivityDate: 2017-04-12T15:58:25.350Z
Answers.UserDisplayName: Christian Wach
Answers.Body: <p>When members sign up you can give them the option of creating a WordPress account at that time. It is in the Advanced Settings of the profile. You can give the option or require account creation. </p>
  
  <p>This will not stop the sync but should reduce the number of duplicates. </p>
  
  <p>Hope it helps...</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-10T16:07:17.757Z
Answers.LastActivityDate: 2017-04-10T16:07:17.757Z
Answers.UserDisplayName: KilakwaBT
Answers.Body: <p>From reading between the lines of your question, I think you're taking the wrong approach. Rather than not syncing the contacts, why not prevent deduplication unless the names, DOBs, and the emails are the same? This is doable through the interface, allows you to have genuine matches between accounts where correct, and meets the need you stated.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-14T05:56:32.353Z
Answers.LastActivityDate: 2017-04-14T05:56:32.353Z
Answers.UserDisplayName: JohnFF
Body: <p>I have a CiviCRM database on my WordPress site. When new members sign up for our organization they create a CiviCRM account via the profile. Later they create accounts in WordPress to access certain members-only sections of the site. I do not want these WordPress accounts to sync. How can I disable that feature? I am now getting many duplicate records (and I need to allow duplicates as we have individual records -- children -- with same email -- parent).</p>
  
Tags: <wordpress>
Title: Can I disable syncing when WordPress users create accounts?
ThreadText: # Can I disable syncing when WordPress users create accounts?
  
  (Asked by: username_0 on 2017-04-07)
  
  I have a CiviCRM database on my WordPress site. When new members sign up for our organization they create a CiviCRM account via the profile. Later they create accounts in WordPress to access certain members-only sections of the site. I do not want these WordPress accounts to sync. How can I disable that feature? I am now getting many duplicate records (and I need to allow duplicates as we have individual records -- children -- with same email -- parent).
  
  **Tags:** wordpress
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2017-04-12. Score: 1
  
  You can unhook CiviCRM's hook callbacks like this:
  add_action( 'plugins_loaded', 'my_disable_civi_user_sync' );
  function my_disable_civi_user_sync() {
      if ( ! function_exists( 'civi_wp' ) ) return;
      remove_action( 'user_register', array( civi_wp()->users, 'update_user' ) );
      remove_action( 'profile_update', array( civi_wp()->users, 'update_user' ) );
      remove_action( 'deleted_user', array( civi_wp()->users, 'delete_user_ufmatch' ), 10 );
  }
  
  Disclaimer: this is untested code. You may need to hook into a later action, e.g. init.
  
  
  ---
  
  ### Answer by username_2 on 2017-04-10. Score: 0
  
  When members sign up you can give them the option of creating a WordPress account at that time. It is in the Advanced Settings of the profile. You can give the option or require account creation.
  
  This will not stop the sync but should reduce the number of duplicates.
  
  Hope it helps...
  
  
  ---
  
  ### Answer by username_3 on 2017-04-14. Score: 0
  
  From reading between the lines of your question, I think you're taking the wrong approach. Rather than not syncing the contacts, why not prevent deduplication unless the names, DOBs, and the emails are the same? This is doable through the interface, allows you to have genuine matches between accounts where correct, and meets the need you stated.
  
  
  ---
  
  