I've created a patch file that integrates blizzardapi_login with persistent_login. Since there are so many form overrides being done by the blizzardapi module, I felt that the changes should go there.
The big change is sending $form_state['values'] to the user_login_submit(array(), $login_state); call.
I have a slight inclination that I'm not doing this in the "Drupal way." Perhaps the blizzardapi_login module should spoof the user_login form, so that other modules can act on it?
In the mean time, I just hardcoded the persistent module work and added it to the #limit_validation_errors form element.
Comments
Comment #3
MattA commentedReally something like this should reside in its own module so that neither existing module has to maintain a list of third-party specific features (and have to issue a release whenever one requires a change). If a there is a problem with this module that blocks the implementation of that module however, feel free to create another issue though.
That said, there are only two forms to modify and you can use existing Drupal alter hooks to both add the checkbox and add a submit callback to save its state. Then use the existing hook_blizzardapi_login_success() to create the persistent_login cookie. This should not be done via user_login_submit(), but persistent_login does not appear to expose a proper API, so you will likely have to call its internal functions (see persistent_login_user_login() for what has to be done).