Skip Navigation

[Resolved] Showing logged in user data

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by milanV 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2320001

Hello guys,
I'm trying to show logged in user information, like email or phone number.

I know I can show any post author data with [types usermeta='field-i-need' user_is_author='true'][/types]

Is there a similar shortcode to display logged-in user data?

Best regards
Thanks a lot !

#2320283

Hello,

If it is custom user field created with Toolset Types plugin, you can use [types] shortcode with user_current="true" attribute, for example:
[types usermeta='field-i-need' user_current='true'][/types]
https://toolset.com/documentation/customizing-sites-using-php/functions/
user_current:
"true" - output user field for the logged in user

If it is other user field, please try [wpv-user] shortcode, for example:
[wpv-user field="user_email"]
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user
it will display information for the current logged-in user

#2320319

Best thanks Luo Yang,
That works !

Have a nice day 🙂

My issue is resolved now. Thank you!