Can we give Pending as a Role to wp_insert_user?

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 a default 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 called pending without capabilities and use it while calling wp_insert_user() functions.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)