Hello! Guys tell me what's wrong, I need to restrict login to your account for easy customers (role), here such code:
//here try different variants, but does not work
add_filter('authenticate',function($user,$username) {
if (!is_wp_error($user)) {
$auth_user=get_user_by('login',$username);
if ($auth_user && !is_u...