I'm not able to understand what is the code I should use to verify if user has (or not) a profile (made by profile2 module) associated.
I use profile2_load_by_user($uid, "my-profile-name")
and it always returns me a "Profile" object... also for users that has not that profile (for example users listed in /admin/people/noprofile
).
I know I can test if some mandatory field is currently filled, but do you know what is the "formally correct" way to proceed?
Thanks