Quantcast
Channel: WordPress.org Forums » [WordPress MU Domain Mapping] Support
Viewing all articles
Browse latest Browse all 3502

stephentims on "[Plugin: WordPress MU Domain Mapping] Remote Login by Role"

$
0
0

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 all articles
Browse latest Browse all 3502

Trending Articles