You are here

function fbconnect_user_avatar_setting in Facebook Connect 5

Return the user avatar settings.

4 calls to fbconnect_user_avatar_setting()
fbconnect_form_alter in ./fbconnect.module
Impletementation of hook_form_alter.
fbconnect_user_edit_submit in ./fbconnect.module
If the user deletes the photo or load a new picture, we deactivate the automatic import of the Facebook avatar.
fbconnect_user_settings_form in ./fbconnect.module
This form allows the user to manage their facebook connect settings.
fbconnect_user_settings_form_submit in ./fbconnect.module
Handle post-validation user_settingsForm submission.

File

./fbconnect.module, line 560
This module allows site visitors to connect and register with facebook account

Code

function fbconnect_user_avatar_setting($uid, $value = NULL) {
  if (is_numeric($value)) {
    return db_query('UPDATE {fbconnect_users} SET avatar = %d WHERE uid = %d', $value, $uid);
  }
  return db_result(db_query('SELECT avatar FROM {fbconnect_users} WHERE uid = %d', $uid));
}