Get field value
-
Hi,
In user profile page, except of showing the fields data, I want to get the name and mobile number of current user to do something else. I am using PHP snippets and I wrote the following code to get the user name.
<?php
$display_name = um_user(‘display_name’);
echo $display_name; // prints the user’s display name
?>BUT I cannot get the mobile number (field meta key is mobile_number) by using the following:
<?php
$display_mobile = um_user(‘mobile_number’);
echo $display_mobile;
?>What am I doing wrong? Any ideas?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Get field value’ is closed to new replies.