Hello Friends,

how i can retrieve field api values in user_profile_form page, instead of using like this , is there any function exist for using to get these values.

currently i am using this code ,

$form['field_what_is_your_preferred']['und']['#entity']->field_what_is_your_preferred['und'][0]['tid']

Please help to resolve this problem.

Regards

Arun Chandran

Comments

Hi Arun, If you want to

Hi Arun,

If you want to retrieve profile information of current logged in user or slected user by ID.
you can use profile module api to load selected users profile information.

<?php
 
global $user;
 
profile2_load_by_user($user->uid);
?>

This will load all information for current logged in user.

Thanks,

Tushar Bodake

using "profile2" module to extend a user profile fields

Tushar, i have checked this function . its used when we are using "profile2" module to extend a user profile fields . but i am not using profile2 module i am added fields using core "field api".

nobody click here