create a custom form based on user fields
Is it possible you missed the comment (below)? It's on the post you linked to.


  "module_load_include('inc', 'user', 'user.pages'); should be added to hook_init() otherwise all profile form functionalities that require AJAX calls will return the error 'Call to undefined function user_profile_form_validate().'"