Hello everyone!
How can I get phone field from manager admin profile to show at front-end to any visitor?
MODX Revo 2.4.2
Thank you!
-
☆ A M B ☆
- 24,524 Posts
Use the userinfo output modifier:
[[user#:userinfo=`phone`]]
The user# is the user ID, this can be either a specific ID or any snippet or other means of returning the desired user's ID.
discuss.answer
Hi Susan!
I got a solution from other MODX forum:
https://modx.pro/help/7322/
In Russian
[[!+modx.user.id:default=`1`:userinfo=`phone`]]
-
☆ A M B ☆
- 24,524 Posts
That will show the phone for the current user, if he is logged in, and only for the user ID #1 if the current user is not logged in.
The +modx.user.id is a placeholder provided by MODX for the current user.
@sottwell, it works perfect !
Even if admin is logout from manager.
I tested from different computers (no saved cookies).