# Patreon Wordpress Plugin: Echo out variable for patron's username or email when logged in?

**URL:** <https://www.patreondevelopers.com/t/patreon-wordpress-plugin-echo-out-variable-for-patrons-username-or-email-when-logged-in/741>\
**Category:** Wordpress Plugin\
**Created:** [June 23, 2018, 5:26pm UTC](https://www.patreondevelopers.com/t/patreon-wordpress-plugin-echo-out-variable-for-patrons-username-or-email-when-logged-in/741 "2018-06-23T17:26:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swtorista](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@swtorista](https://www.patreondevelopers.com/u/swtorista)\
**Post date:** [June 23, 2018, 5:26pm UTC](https://www.patreondevelopers.com/t/patreon-wordpress-plugin-echo-out-variable-for-patrons-username-or-email-when-logged-in/741/1 "2018-06-23T17:26:40Z")

</div>

Hello!

- I am creating a trivia quiz for my patrons
- I have already created the “trivia” part how to answer questions, and how score is kept in PHP
- I have figured out how to hide the quiz within Wordpress’s content so it can be seen by logged in patrons and not seen by non-patrons
- I am working on how to attach a patron’s score with their own account. My first idea was to simply have them re-enter their email or nickname when they log in, but I am worried people might try and sabotage other player’s scores by entering in their emails and getting bad scores (hah). So I would like to instead tie their score to their patreon account that the wordpress plugin is checking to make sure they are logged in to patreon.

**Is it possible to capture the email or username of the current Patreon user in the wordpress plugin?**

Or some other unique variable to their account, even if its an ID number, so they can’t retake the quiz or take someone else’s quiz?

Thank you! I hope my second question on this nice forum is a little more on topic! Cheers!

---

<div class="post-metadata">

**Author:** ![codebard](https://yyz2.discourse-cdn.com/flex036/user_avatar/www.patreondevelopers.com/codebard/32/14_2.png) [@codebard](https://www.patreondevelopers.com/u/codebard)\
**Post date:** [June 25, 2018, 7:19pm UTC](https://www.patreondevelopers.com/t/patreon-wordpress-plugin-echo-out-variable-for-patrons-username-or-email-when-logged-in/741/2 "2018-06-25T19:19:40Z")

</div>

Plugin already gets user details for logged in patrons:

patreon\_user user meta carries user’s Patreon vanity name ( i believe that is the username you are looking for)  
patreon\_user\_id carries user’s Patreon user id

and,

display\_name  
first\_name  
last\_name

would carry the user’s first, last names (if given at Patreon) and a generated display name (wordpress).

The last 3 are updated into default WP user details. The earlier 2, you will have to get from user’s meta.
