Modifying contribution modules safely and conventionally I want to modify a contrib module in such a way that I don't lose my customizations whenever I update the module. Below is my git diff from the changes I want to make. I use git and drush.

What I am wondering is, how can I add something to my own custom help module that will have the same affect?

The change I had made was to disable the function in this Facebook connect module that grabs the user's picture and adds it to the profile.



+// Disable facebook profile picture integration (CH)
     // If user pictures are enabled, try to get the profile picture from FB.
-    if (variable_get('user_pictures', 0)) {
-      $fid = simple_fb_connect_get_fb_profile_pic($fb_session);
-      if ($fid) {
-        $fields['picture'] = $fid;
-      }
-    }
+//    if (variable_get('user_pictures', 0)) {
+//      $fid = simple_fb_connect_get_fb_profile_pic($fb_session);
+//      if ($fid) {
+//        $fields['picture'] = $fid;
+//      }
+//    }
You should not modify the contrib module directly and save it. You should create a patch file and use that patch file in the project. This way every time if there is any update in that module, you run drush command and your changed will be safely applied. Please refer this page to create a patch file if you don't know How to create Drupal patch with git.