Up to 50 percent off

Forum Replies Created

Viewing 1 Topics - 1 through 1 (of 1 total)
Author Posts
July 11, 2013 at 10:39 pm in reply to: Choose user type on registration 5886
mfragale mfragale

Tried to use this function, but it didn’t work.

function wpufe_my_switch_reg( $args ) {
    if ( $_POST['role'] == 'Editor' ) {
        $args['role'] = 'editor';
    } elseif ( $_POST['role'] == 'somethings_else' ) {
        $args['role'] = 'subscriber';
    }
 
    return $args;
}
 
add_filter( 'wpuf_register_user_args', 'wpufe_my_switch_reg' );

I made a registration form with a dropdown menu with the Meta Key = role.

What am I missing here?

Viewing 1 Topics - 1 through 1 (of 1 total)