Created
June 5, 2012 21:21
-
-
Save drnikko/2878067 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| if ($acct = user_load_by_name('admin')) { | |
| echo "loaded user"; | |
| // this loads the user's profile 2 data, of the profile2 | |
| if ($profiletwo = profile2_load_by_user($acct->uid, 'part_1')) { | |
| // and this returns just the term id of what they selected | |
| print_r($profiletwo->field_part1_skills); | |
| } | |
| else { | |
| echo "cannot load profile"; | |
| } | |
| } | |
| else { | |
| echo "cannot load user"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment