check_import_new_users

函数
check_import_new_users ( $permission )
参数
  • (string) $permission A permission to be checked. Currently not used.
    Required:
返回值
  • (bool) True if the user has proper permissions, false if they do not.
定义位置
相关方法
get_importerswp_check_for_changed_slugswp_check_for_changed_datescheck_password_reset_keyregister_new_user
引入
3.0.0
弃用
-

check_import_new_users: 这个函数在导入用户时检查一个用户是新的还是已经存在。它是用来防止在导入过程中创建重复的用户。

检查当前用户是否有导入新用户的权限。

function check_import_new_users( $permission ) {
	if ( ! current_user_can( 'manage_network_users' ) ) {
		return false;
	}

	return true;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 12:36:31

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: