Tag Info

New answers tagged

-1

/* this is an redirect action */ function BB_ECC_login_redirect_code( $redirect_to, $request, $user ) { $user_login_time = get_user_meta( $user->id , 'user_login_time' , true ); if( $user_login_time <= 1 ){ $new_url = bp_core_get_user_domain( $user->id )."profile/"; $user_login_time++; update_user_meta($user->id, ...


2

With this code, you will check during the registration the users email and attach the roles you want to: <?php add_action( 'user_register', 'wp234_set_role_by_email' ); function wp234_set_role_by_email( $user_id ){ $user = get_user_by( 'id', $user_id ); $domain = substr( strrchr( $user->data->user_email, "@" ...



Top 50 recent answers are included