How to pass the custom field values which were stored while creating a new user into the wp_get_current_user array function
When I call the wp_get_current_user() function the result which I found is as follows:
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] =>
)
But I want the answer to be as
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] =>
)
Compare the [data] part of both the array
How do I achieve this?
Thanks for the help in advance