Wordpress 如何通过用户 ID 获取所有用户元数据? [英] Wordpress how to get all user meta data by user ID?
本文介绍了Wordpress 如何通过用户 ID 获取所有用户元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Wordpress 中通过用户 ID 获取所有用户元数据?
how to get all user meta data by user ID in Wordpress?
推荐答案
@Boopathi Rejan 差点就搞定了.使用以下代码输出所有用户元数据,然后查看并找到您
@Boopathi Rejan nearly had it. Output all of the user meta by using the following code and then look through and find the values you
$user_info = get_user_meta($current_user->ID);
var_dump($user_info);
您可以将 USERID 更改为任何内容,目前设置为显示登录用户的 ID.
You can change the USERID to anything, currently this is setup to display the ID of the logged in user.
这篇关于Wordpress 如何通过用户 ID 获取所有用户元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文