You are here

function fbconnect_login_user_edit_submit in Facebook Connect 7.2

Same name and namespace in other branches
  1. 8.2 fbconnect_login/fbconnect_login.module \fbconnect_login_user_edit_submit()

If the user deletes the photo or load a new picture, we deactivate the automatic import of the Facebook avatar.

1 string reference to 'fbconnect_login_user_edit_submit'
fbconnect_login_form_alter in fbconnect_login/fbconnect_login.module
Implements hook_form_alter().

File

fbconnect_login/fbconnect_login.module, line 440
Login functionality for Facebook Connect module

Code

function fbconnect_login_user_edit_submit($form, &$form_state) {
  if ($form_state['values']['picture_delete'] || $form_state['values']['picture']) {
    $user = user_load(arg(1));
    $data['fb_avatar'] = 0;
    user_save($user, $data);
    drupal_set_message(t('Auto import of your Facebook picture has been disabled.'));
  }
}