How to pass the custom field values which were stored while creating a new user into the wp_get_current_user
array function
当我打电话给
wp_get_current_user()
函数我发现的结果如下:
WP_User Object
(
[data] => stdClass Object
(
[ID] => 20
[user_login] => testing
[user_pass] => $P$BAfSwYFZEUKIkQyF30Eq7GN3HOUXFW/
[user_nicename] => testing
[user_email] => [email protected]
[user_url] =>
[user_registered] => 2015-12-15 07:11:35
[user_activation_key] => 1450163495:$P$Br7QHNREuY.esEZdB3c92fK2CrW9QH.
[user_status] => 0
[display_name] => testing testing
[token_key] =>
)
[ID] => 20
[caps] => Array
(
[subscriber] => 1
)
[cap_key] => wp_capabilities
[roles] => Array
(
[0] => subscriber
)
[allcaps] => Array
(
[read] => 1
[level_0] => 1
[subscriber] => 1
)
[filter] =>
)
但我希望答案是
WP_User Object
(
[data] => stdClass Object
(
[ID] => 20
[user_login] => testing
[user_pass] => $P$BAfSwYFZEUKIkQyF30Eq7GN3HOUXFW/
[user_nicename] => testing
[user_email] => [email protected]
[user_url] =>
[user_registered] => 2015-12-15 07:11:35
[user_activation_key] => 1450163495:$P$Br7QHNREuY.esEZdB3c92fK2CrW9QH.
[user_status] => 0
[display_name] => testing testing
[token_key] =>
[client] => abc
[user_groups] => test
)
[ID] => 20
[caps] => Array
(
[subscriber] => 1
)
[cap_key] => wp_capabilities
[roles] => Array
(
[0] => subscriber
)
[allcaps] => Array
(
[read] => 1
[level_0] => 1
[subscriber] => 1
)
[filter] =>
)
比较
[data] 两个阵列的一部分
我如何做到这一点?
提前谢谢你的帮助