Needs work
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Mar 2009 at 06:39 UTC
Updated:
8 Jan 2012 at 23:26 UTC
Maybe i am just missing this; but wouldn't be pretty handy to have an api call provided to let me get the content profile info for a user.
Ideally, i guess if i did a user_load i would get the content_profile node content from that users content_profile nodes. But failing that, why not simply a content_profile_load($uid, $type) where type is either the cp cck type or "all" for all the user's cp info.
maybe my case is too extreme but seems pretty simple:
- i have a node with a user ref field
- i want to pull some info from the cp of the user referenced by that userref field
so, i have the user's uid, but dont see anyway to get at his cp data (short of just writing the sql myself)
Comments
Comment #1
andreiashu commentedHi. There already is a function that does that (i'll paste it directly from cp):
function content_profile_load($type, $uid, $lang = '')where $type is the content profile's type.Comment #2
andreiashu commentedthe function is at line 466 :)
Comment #3
andreiashu commentedI think this issue is fixed. If one thinks not then reopen it.
Comment #5
dealancer commentedPlease document how to call this function on the module front page and README file. Now this function is on line 481
Comment #6
dealancer commentedComment #7
dealancer commentedComment #8
jjustman commentedIt seems that type => 'all' does not work any more.
Comment #9
dbinoj commentedAPI documentation for this module would be great!!
Comment #10
mattcasey commentedcontent_profile_load() from most recent dev: