Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Created November 6, 2018 20:31
Show Gist options
  • Save thomasplevy/a883270b41ed50a437c0e604a2d367d0 to your computer and use it in GitHub Desktop.
Save thomasplevy/a883270b41ed50a437c0e604a2d367d0 to your computer and use it in GitHub Desktop.
<?php // don't copy this line to your functions.php file
/**
* Use a different role during LifterLMS user registrations
* @param array $data assoc. array of data to be used to create the new user
* @return array
*/
function my_modify_default_user_role( $data ) {
$data['role'] = 'subscriber';
return $data;
}
add_filter( 'lifterlms_user_registration_insert_user', 'my_modify_default_user_role' );
@BurlesonBrad
Copy link

note: use in onboarding for course
WC users need to understand the difference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment