You cannot set a value as pending ( left the role
parameter blank ) to not enter a user role value into database using function – wp_insert_user()
.
See – wp-includes/user.php # L1363
NOTE –
wp_insert_user()
function sets adefault
role if you do not provide any role parameter, So if you want to register a user without any capabilities, I think there’s only way is register a new role calledpending
without capabilities and use it while callingwp_insert_user()
functions.