By Marcus Palmer on Wednesday, 30 July 2014
Replies 6
Likes 0
Views 811
Votes 0
Thought i'd open another ticket as last one i ACCEPTED ANSWER but had a few more questions!

If i have created a custom field on registration i.e "Student ID" with the Unique Key being "TEXTBOX-3" how would i retrieve this information?
Hello Marcus Palmer,

You can use the following code to retrieve the unique key TEXTBOX-3 data :

$user = Foundry::user('YOUR-USER-ID'); // specific user based on the user-id
// or
$user = Foundry::user(); // current logged user

echo $user->getFieldValue('TEXTBOX-3');


Hope this help.
·
Wednesday, 30 July 2014 17:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Get Email Address - Is this the correct code


<?php echo Foundry::user()->getEmail(); ?>
·
Wednesday, 30 July 2014 17:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Gone through the user.php located at : /administrator/components/com_easysocial/includes/user/user.php

and for the life of me cannot find "phone" "tel" to call correct user telephone number.

Am i looking in the correct place for user calling methods?
·
Wednesday, 30 July 2014 17:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marcus Palmer,

You should use this code to get your current user email address.

<?php echo Foundry::user()->email; ?>

Yes, you are looking to correct file, If you would like to retrieve the "phone" or "tel" data from your current user, we just using this method getFieldValue to get the custom field data, did you try my first reply suggestion?
·
Wednesday, 30 July 2014 18:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Arlex Wong wrote:

Hello Marcus Palmer,

You should use this code to get your current user email address.

<?php echo Foundry::user()->email; ?>

Yes, you are looking to correct file, If you would like to retrieve the "phone" or "tel" data from your current user, we just using this method getFieldValue to get the custom field data, did you try my first reply suggestion?


ACE! @ArlexWong

"You di Man!!!!"

Cheers bro that did the trick, will try custom field with phone info calling now....

Really appreciate the help here!
·
Wednesday, 30 July 2014 18:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Marcus Palmer,

You're welcome Keep us updated then.
·
Wednesday, 30 July 2014 18:21
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post