Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter stephentims

    (@stephentims)

    Hi, Thanks for the tip. I used the following, though it doesn’t seem to give me the desired result (enable remote login for ‘administrator’ roles). Could you take a peek and share some insight? Thanks in advance!

    function enable_remote_login() {
    	$user_id = get_current_user_id();
    	$user = new WP_User($user_id);
    	$role = array_shift($user -> roles);
    	if ($role === 'administrator') {
    		return true;
    	} else {
    		return false;
    	}
    }
    add_filter('pre_site_option_dm_remote_login', 'enable_remote_login');
Viewing 1 replies (of 1 total)