I am currently only able to use rules to capture profile data when a user signs up to the site.

I want to be able to trigger rules both when a user links additional accounts and when they log in.

This will make it possible to capture any changed fields during login.
Currently it is only possible to capture fields from one social account. The one originally used to sign up. Adding a trigger on linking additional accounts will allow rules to be used to capture that data

Comments

bigmonmulgrew created an issue. See original summary.

bigmonmulgrew’s picture

Man I am sleep deprived and am not very familiar with the code for oneAll or rules, but I have been trying.

I have added

if (module_exists('rules')) {
        $oa_fields_invoke = array(
          'account' => $account
        );
        $oa_fields = social_login_core_profilefields($user_data);
        foreach ($oa_fields as $name => $desc) {
          $oa_fields_invoke[$name] = $desc['value'];
        }
        rules_invoke_event_by_args('social_login_core_user_login', $oa_fields_invoke);
      }

at line 797 in social_login_core.module and added a rules trigger in social_login_core.rules.inc

/* Rules event when OneAll user is logs in */
		'social_login_core_user_login' => 
			array(
				'label' => t('OneAll login user.'),
				'group' => t('OneAll Social Login'),
				'variables' => $oa_vars,
			),  

It does seem to work but generates the following error

Notice: Object of class stdClass could not be converted to int in drupal_write_record() (line 7353 of /var/www/GrizzlyAndrew/grizzlynation.tv/includes/common.inc).
Notice: Object of class stdClass could not be converted to int in drupal_write_record() (line 7353 of /var/www/GrizzlyAndrew/grizzlynation.tv/includes/common.inc).

I will pick this up soon when I'm not sleep deprived and have time to learn rules properly, but thought I'd post my progress in the hopes someone else can jump in who knows these better than I do.

ClaudeSchlesser’s picture

Hello,

have you been able to come up with a solution?

Best Regards,

ClaudeSchlesser’s picture

Status: Active » Closed (outdated)