Following improvements are required in some tasks:

1. Ability to use existing contact to synchronize with crm_user_sync_sync() function.
2. Ability to enable/disable auto contact creation when new user is created.

Comments

dealancer’s picture

Here is a patch that I am going to commit.

dealancer’s picture

Status: Active » Needs review
franz’s picture

Status: Needs review » Needs work
+++ b/modules/crm_user_sync/crm_user_sync.admin.inc
@@ -39,6 +39,14 @@ function crm_user_sync_admin($form_state) {
+    '#title' => t('Crate new and associate contact record when new user is created.'),
+    '#description' => t('You can build your custom functionality if this option is disabled.'),

Typo there.

Title could be "Automatically create an associated contact when account is created" (no period)

Description can be "Disable this option if you want to manage synchronization within custom modules." (with period)

+++ b/modules/crm_user_sync/crm_user_sync.admin.inc
@@ -70,6 +78,7 @@ function crm_user_sync_admin_validate($form, &$form_state) {
+  ¶

whitespace

+++ b/modules/crm_user_sync/crm_user_sync.module
@@ -143,7 +147,7 @@ function crm_user_sync_user_delete($account) {
  * Synchronizes user.
  * @param $account to be synchronized
  */
-function crm_user_sync_sync($account) {
+function crm_user_sync_sync($account, $contact = NULL) {

Missing the new parameter in the docblock. Also need to add the new @return element.

dealancer’s picture

Status: Needs work » Needs review
StatusFileSize
new4.15 KB

Thanks for review, here is new patch.

dealancer’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit b0b47d2 on 7.x-1.x, development, import by dealancer:
    Issue #1597496: new features to crm_user_sync
    
    

  • Commit b0b47d2 on 7.x-1.x, development, import, activity_pages by dealancer:
    Issue #1597496: new features to crm_user_sync