Extra field data at signup
-
Hello,
I’m just getting my feet wet with WP so please bear with me.
I’ve created a small plugin that adds an extra dropdown with options as what you are registering. In this case it’s ‘talent’ and ‘scout’ (it’s for an online casting platform). The type of signup is directly linked to roles/capabilities. If the user signs up as talent, wp_capabilities must be set accordingly. But how do you set the serialized capabilities for a new user?
What’s the best way/hook/filter to do this? Thanks in advance!
function register_update_role($user_id) { update_usermeta( $user_id, 'wp_capabilities', $_POST['signup_role'] ); } add_action('user_register', 'register_update_role');
- The topic ‘Extra field data at signup’ is closed to new replies.