function profile2_load in Profile 2 7
Same name and namespace in other branches
- 7.2 profile2.module \profile2_load()
Fetch a profile object.
Parameters
$pid: Integer specifying the profile id.
$reset: A boolean indicating that the internal cache should be reset.
Return value
A fully-loaded $profile object or FALSE if it cannot be loaded.
See also
2 calls to profile2_load()
- Profile2CRUDTestCase::testCRUD in ./
profile2.test - Tests CRUD for a profile related to a user and one unrelated to a user.
- profile2_load_by_user in ./
profile2.module - Fetch profiles by account.
File
- ./
profile2.module, line 229 - Support for configurable user profiles.
Code
function profile2_load($pid, $reset = FALSE) {
$profiles = profile2_load_multiple(array(
$pid,
), array(), $reset);
return reset($profiles);
}