Last active
August 14, 2017 23:39
-
-
Save ultimatemember/d1cdd1ffb04b74743c6b to your computer and use it in GitHub Desktop.
Sync UM role during Gravity user registration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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