用户可以编辑其他用户吗?

原型

user_can_edit_user( int $user_id, int $other_user )

参数

$user_id (int) (Required)

$other_user (int) (Required)

返回值

(bool)  

源文件

路径:wp-includes/deprecated.php

<?php
...
function user_can_edit_user($user_id, $other_user) {
	_deprecated_function( __FUNCTION__, '2.0.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;
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/user_can_edit_user/