This part is wrong.
$_gf_edit_profile_id = RGFormsModel::get_form_id('25');
add_action('gform_after_submission_25' . $_gf_edit_profile_id, 'GF_update_profile', 100, 2); }
If your Form ID is 25, and the form isn't named 25. The lines should be replaced with:
add_action('gform_after_submission_25', 'GF_update_profile', 100, 2); }
If the from is called 25 and you don;t know the ID the lines should be:
$_gf_edit_profile_id = RGFormsModel::get_form_id('25');
add_action('gform_after_submission_' . $_gf_edit_profile_id, 'GF_update_profile', 100, 2); }
The code looks very similar to the article I wrote a while back on updating the User Profile using Gravity Forms. You can read it here with the explanation of the code.