roles ) && is_array( $user->roles ) ) { if ( in_array( 'administrator', $user->roles ) ) { // Administrators start at the BPQ admin page. return admin::url_landing(); } else { // Non-administrators get forced to the main page. return home_url(); } } // Making it here means that the user is not available, so just default. return $redirect_to; } ?>