The codex has a function called get_user_option()
but it requires me to pass the name of the option. Is there a wp function to retrieve all user options? I just need to see a list of all options set for a specific user. The only other similar function I found is get_alloptions()
but that has been deprecated.
-
1You can use get_user_meta($user_id) function– DomainCommented Jun 18, 2015 at 13:50
Add a comment
|
1 Answer
You will get all the meta for the user by using get_user_meta function
$all_meta_for_user = get_user_meta( [user ID] );
echo "<pre>";
print_r( $all_meta_for_user );
-
Adding a
echo "<pre">;
before theprint_r()
can improve readability. :) Commented Jun 18, 2015 at 13:55 -
Thanks. I failed to realize that get_user_meta would retrieve all options.– gdanielCommented Jun 18, 2015 at 13:57