How to print profile id associated with the user in Drupal?
I need to print profile id (pid) of the logged in user. User id and profile id is a different number, but they are corr开发者_运维知识库eltaed in the profile table in database. Any idea how can i do it?
One way is to use profile2_load_by_user($account, $type_name = NULL). Worst-case scenario, you can always db_query from the database.
精彩评论