Title: Use username
Last modified: December 16, 2019

---

# Use username

 *  Resolved [andrewpienaar](https://wordpress.org/support/users/andrewpienaar/)
 * (@andrewpienaar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/use-username/)
 * Hi,
 * I’m working on a site for a local running club, and would like to display a person’s
   results that is saved in Google Sheets. Is it possible to use the person’s wordpress
   login name to search a google table for their results?
 * Eg. If his name is Peter Parker, it will search the first column of the sheet
   for Peter Parker and return the result in the neighbouring cell?
 * kind regards,

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [andrewpienaar](https://wordpress.org/support/users/andrewpienaar/)
 * (@andrewpienaar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/use-username/#post-12249224)
 * Edit: I think gdoc key=”ABCDEFG” query=”select A where max(B)” will work, but
   is there any way to pass the current logged in user ID to the shortcode?
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/use-username/#post-12251654)
 * From the plugin README file (i.e., the documentation):
 * > A common use case for [the `gdoc_query`] filter is to query a datasource such
   > as a Google Spreadsheet using dynamically generated content, like the email
   > address or username of the current user.
 *  Thread Starter [andrewpienaar](https://wordpress.org/support/users/andrewpienaar/)
 * (@andrewpienaar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/use-username/#post-12253827)
 * Hi Meitar,
 * Thanks for the reply -I read the documentation and I still don’t know how I can
   add the current WordPress username into the shortcode?
 * Example: gdoc key=”ABCDEFG” query=”SELECT A where B=xxx” where xxx is the wordpress
   user login.
    Any ideas if I can implement this?
 *  Thread Starter [andrewpienaar](https://wordpress.org/support/users/andrewpienaar/)
 * (@andrewpienaar)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/use-username/#post-12257951)
 * No worries! Managed with a php snippet 🙂
 * great plugin
 *  [mocsary](https://wordpress.org/support/users/mocsary/)
 * (@mocsary)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/use-username/#post-12336165)
 * andrewpienaar how did you do? Im very interested please help me about this!
    -  This reply was modified 6 years, 5 months ago by [mocsary](https://wordpress.org/support/users/mocsary/).
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/use-username/#post-12336201)
 * [https://wordpress.org/support/topic/qdoc-query-under-other-notes-bottom-of-screen-example-request/#post-6261275](https://wordpress.org/support/topic/qdoc-query-under-other-notes-bottom-of-screen-example-request/#post-6261275)
 *  [mocsary](https://wordpress.org/support/users/mocsary/)
 * (@mocsary)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/use-username/#post-12344148)
 * Thank you [@meitar](https://wordpress.org/support/users/meitar/) !!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Use username’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

## Tags

 * [Google Sheets](https://wordpress.org/support/topic-tag/google-sheets/)

 * 7 replies
 * 3 participants
 * Last reply from: [mocsary](https://wordpress.org/support/users/mocsary/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/use-username/#post-12344148)
 * Status: resolved