Overriding the logic of "request new password" in Drupal? I currently have:

function mymod_menu() {
    $items['user/password'] = array(
        'title' =&gt; 'Request new password',
        'page callback' =&gt; 'drupal_get_form',
        'page arguments' =&gt; array('user_pass'),
        'access callback' =&gt; TRUE,
        'type' =&gt; MENU_LOCAL_TASK,
        'file' =&gt; 'user.pages.inc',
    );
}

mymod_form_alter() {
if ($form_id == 'user_pass')
    {
        // do form alterations here...
    }
}


The first part isn't really necessary for editing the form. But my problem isn't the form. My problem is that I don't know how to change the IMPLEMENTATION of this form. I want the change the way the entire "forgot password" process works. I have a fully integrated login solution that relies on a separate database, and I now need to be able to access that database to generate a unique forgotten password url, based on different validation rules.

What would I have to override to change the way the forgotten password page works?
The login system uses various core functions in the core User module to process logins and forgotten passwords.  You really don't want to mess with those (don't edit them).

At any rate hook_form_alter cannot change what those functions do but it can change which function is called.

I would suggest a custom module that 


Creates your own separate login page with the logic you desire
Has a function that sends an email with the tokenised link to your new form
Alters the user_pass form to call the function in #2 instead of the standard function which you can do by editing $form['#submit'].