Created
February 12, 2013 00:24
-
-
Save schutzsmith/4758938 to your computer and use it in GitHub Desktop.
Buddypress Get user profile data function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drop in functions.php | |
function getProfileData($fieldName){ | |
global $bp; | |
return xprofile_get_field_data($fieldName,$bp->loggedin_user->id); | |
} | |
Example Usage - if you have a profile field called Authors Website | |
<?php echo getProfileData("Authors Website"); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment