简体   繁体   中英

Default login or Social login

Is there a way to find out what way user is logged in, default wordpress login (admin/user/...) or social login? I'm using AccessPress Social Login Lite plugin, and need to show WpAdminBar only for wp users, and hide for those who is logged in by any social link.

Try below code

add_action('init','userAdminToolbar');
function userAdminToolbar()
{
 $currentUser = wp_get_current_user();
 $userId = $current_user->ID;
 $soicalLoginStatus = get_user_meta($userId, 'deutype'); 
 if($soicalLoginStatus != '')
 {
    show_admin_bar( false );
 }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM