Skip to content

Instantly share code, notes, and snippets.

@ultimatemember
Last active August 14, 2017 23:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ultimatemember/d1cdd1ffb04b74743c6b to your computer and use it in GitHub Desktop.
Save ultimatemember/d1cdd1ffb04b74743c6b to your computer and use it in GitHub Desktop.
Sync UM role during Gravity user registration
/* This code will update the user registered with gravity
form and allow you to give him a specific UM community role */
add_action("gform_user_registered", "um_gravity_user_role_sync", 88, 4);
function um_gravity_user_role_sync($user_id, $config, $entry, $user_pass) {
update_user_meta($user_id, 'role', 'member'); // member can be your UM role slug
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment