Advertisements

user_can_edit_user

Definition:
function user_can_edit_user($user_id, $other_user) {}

Can user can edit other user.

Parameters

  • int $user_id
  • int $other_user

Source code

function user_can_edit_user($user_id, $other_user) {

	_deprecated_function( __FUNCTION__, '2.0', 'current_user_can()' );



	$user  = get_userdata($user_id);

	$other = get_userdata($other_user);

	if ( $user->user_level > $other->user_level || $user->user_level > 8 || $user->ID == $other->ID )

		return true;

	else

		return false;

}

3293

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: