Wordpress plugin to view user meta data

One of the really great, although probably overlooked by most users, features of Wordpress is that you can store meta data on your users. You probably already know that you can do this for posts, but it’s possible to use the _usermeta table to keep track of custom user settings as well.

A few months ago I redid an ecommerce site of mine and changed from osCommerce to Wordpress. One of the bits of information I’m now storing is how many credits the user has available to download templates. It works great but there wasn’t a way to check how many credits they had available without going into phpMyAdmin.

So I went out and wrote my first Wordpress plugin. The zUserMetaViewer plugin adds itself as a sub tab under the Users tab and displays a clickable list of users. Clicking on a user’s name will take you to a page where all the meta data for that particular user is displayed.

screenshot_main.png

screenshot_individual.png

Download it here

Question, Comments...

Do you have more questions. Please either leave a comment below or join us in our new forum.

2 Responses to “Wordpress plugin to view user meta data”

  1. I have a question. I am also setting up a website using WordPress where I need to store additional metadata about my users.

    How do you prevent one of your users from going into their profile at …/wp-admin/ and giving themselves a million credits that they haven’t paid for?

    I have installed the WP Hide Dashboard plugin to keep my users from the dashboard areas of wp-admin, but they still can see and edit their profile (including all metadata that I have added).

    I have considered restricting access to the /wp-admin/ directories using .htaccess so that only my admins can get there (and only from their known secure IP addresses). But that means that my users’ won’t be able to edit their profiles at all. What I need is a way that some profile info can be changed by the user themselves (firs name, last name, address info, etc.), but other data is hidden from them and can’t be changed (thinks like subscription expiry date). How have you handled that?

  2. I built a page that let them edit their info without going into /wp-admin/. If I recall correctly, it wasn’t an issue because the version I was using didn’t have a way to edit meta. Otherwise this plugin wouldn’t have been needed.

    There is a way to hide meta data. I think it’s by starting the name with a period, so instead of numberOfCredits you could use .numberOfCredits and it wouldn’t show up. At least that’s true on pages and posts.

    That said, I gave up on the eCommerce side of the site that was using this. After a couple of years it only made about 10 bucks so I took off the eCommerce stuff and added a few ads. In the 3 months since then I’ve already gone over what it made as an eCom site.

Leave a Reply