Skip to content

Instantly share code, notes, and snippets.

@keithmancuso
Created September 30, 2014 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithmancuso/24ce1eefa8269c01353a to your computer and use it in GitHub Desktop.
Save keithmancuso/24ce1eefa8269c01353a to your computer and use it in GitHub Desktop.
Salesforce Contact Event
public function init()
{
craft()->users->onActivateUser = function(Event $event) {
$user = $event->params['user'];
// check salesforce for contact with that email address
// if exists, get contact ID and save it on user
// if doesnt exist create contact and account (using organization name) and save contactID on user
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment