is there a way to cleanly override the function "form_execute_handlers(...)" which is found in /includes/form.inc ?
The problem is that there are some handler-functions like "user_profile_form_validate(...)" in /modules/user/user.pages.inc which cannot be found by the core version of "form.inc", since the following statement is missing in "form_execute_handlers(...)" for this special case:
module_load_include('inc', 'user', 'user.pages');
I would like to add that somehow, and therefore override form.inc ;)
Ok, I found a way to include the library (inside my custom module):
function wr_pages_init() {
if (($_GET['q'] == 'system/ajax' || strstr($_GET['q'], 'file/ajax/')) && $_POST['form_id'] == "user_profile_form") {
module_load_include('inc', 'user', 'user.pages');
}
}