function fbconnect_profile_check_profile_cache in Facebook Connect 5
1 call to fbconnect_profile_check_profile_cache()
File
- modules/
fbconnect_profile/ fbconnect_profile.module, line 296 - This module allows users to import their personal information from Facebook.
Code
function fbconnect_profile_check_profile_cache($uid) {
$last_update = db_result(db_query('SELECT timestamp FROM {fbconnect_users} WHERE uid = %d', $uid));
$expire = time() - FBCONNECT_RENEW_CACHE * 3600;
if ($last_update < $expire) {
if (!($fields = fbconnect_profile_get_user_import_setting($uid))) {
return;
}
if (fbconnect_profile_insert_user_info($uid, $fields)) {
drupal_set_message(t('Your Facebook imported information has been updated.'));
}
}
}