我正在为作者编写代码。php。我通过以下方式访问此文件:http://example.com/author/{user_nicename}
假设有一些用户(包括1个管理员、4个或5个编辑器,等等……)现在,当用户单击上面的URL时,他们会看到自己的信息。我想给管理员和编辑权限,以查看其他任意用户的信息。我该怎么做?这是我在author中的代码的一部分。php:
<?php
get_header();
$user_id = get_current_user_id();
global $wpdb;
$result = $wpdb->get_results(" SELECT display_name
FROM wp_introduction
INNER JOIN wp_users
ON costumer_id = ID
WHERE $introducer_id = $user_id" );
var_dump($result);
get_sidebar();
get_footer();
?>