-
Notifications
You must be signed in to change notification settings - Fork 0
userCreate
Called as a hook from the parseFoxycartDatafeed Snippet, if no matching user exists, this hook will create a local MODX user keyed off the user's email. If the email address already exists in the system, then no action is taken.
We can only set the password and other info when we create a user to avoid a user's data being overwritten by a malicious user.
As much as possible, customer data is stored in the default MODX columns, but some of this needs to be stored in a user's extended fields.
$scriptProperties : mostly this is data pulled from a Foxycart XML node, with keys/values matching the tags in that node, e.g.
Control the behavior of how your users are added to the site via these System Settings:
-
moxycart.user_group: id of usergroup where new users should be added
-
moxycart.user_role: id of role for new users.
-
moxycart.user_activate: whether or not new users should be activated immediately
-
moxycart.user_update: whether or not to update user data when with new data received via postback
-
@params everything from a node in the Foxycart XML
-
@return string message indicating completion or false on fail.
© 2014 and beyond by Craftsman Coding