Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Setting User Role During Custom Registration

@henrywright

Moderator

The user was registered as a contributor even though it should have been an expert.

This shows that $_POST['user_type'] is either a) not set or b) set to something that isn’t ‘expert’. This shows, your problem isn’t with your switch statement, or your wp_update_user() function; instead, the problem is with your $_POST data. You’ll need to investigate how you’re capturing data from your form.

Skip to toolbar