function fbconnect_profile_available_import in Facebook Connect 5
Validate user information available from facebook
Return value
array
2 calls to fbconnect_profile_available_import()
- fbconnect_profile_form_alter in modules/
fbconnect_profile/ fbconnect_profile.module - Implementation of hook_form_alter().
- fbconnect_profile_import_form in modules/
fbconnect_profile/ fbconnect_profile.module - Return the import form.
File
- modules/
fbconnect_profile/ fbconnect_profile.module, line 76 - This module allows users to import their personal information from Facebook.
Code
function fbconnect_profile_available_import($fbuid) {
$conf = variable_get('fbconnect_profile_fields', NULL);
$fields = implode(', ', array_filter($conf, 'fbconnect_import_filter'));
if ($res = fbconnect_get_info_from_fb($fbuid, $fields)) {
$label = variable_get('facebook_user_fields', NULL);
foreach ($res as $key => $value) {
if ($value) {
if (is_array($value)) {
$field[$key] .= $label[$key];
}
else {
$field[$key] .= $label[$key] . ' : ' . check_plain($value);
}
}
}
return $field;
}
}