function fbconnect_profile_get_profile in Facebook Connect 5
Query fbconnect user information.
Return value
array
1 call to fbconnect_profile_get_profile()
- fbconnect_profile_user in modules/
fbconnect_profile/ fbconnect_profile.module - Implementation of hook_user().
File
- modules/
fbconnect_profile/ fbconnect_profile.module, line 221 - This module allows users to import their personal information from Facebook.
Code
function fbconnect_profile_get_profile($uid) {
$res = db_query('SELECT * FROM {fbconnect_profile} WHERE uid = %d', $uid);
$fields = db_fetch_array($res);
if ($fields) {
$serialized = array(
'affiliations',
'hometown_location',
'current_location',
'meeting_sex',
'meeting_for',
);
array_shift($fields);
foreach ($fields as $key => $value) {
if (in_array($key, $serialized) && $value) {
$data[$key] = unserialize($value);
}
else {
if ($value) {
$data[$key] = $value;
}
}
}
return $data;
}
}