Is there a drupal 6 hook to handle login authentication without submitting from the login form?

I am working on a Drupal-based system that will not directly handle login processing.

Rather, another system will handle user authentication and transfer data directly to Drupal via the GET parameter.

Is it possible to connect a function that will process this GET parameter and check the user?

I come to the development of this system late, and many things have already been chosen for me, so I have to work with what has already been developed. Any advice would be greatly appreciated!

+4
source share
2 answers

I was able to accomplish what I needed using hook_init () and user_external_login_register ().

Not quite sure why I hadn't thought about this before!

+5
source

Why not just check out $ _GET in the function that defines the form? You can then call user_authenticate( $form _GET in the function that defines the form? You can then call user_authenticate( $form _values).

http://api.drupal.org/api/function/user_authenticate/6

You can also just verify the credentials in $ _GET when the form is submitted using validation.

http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html#validate

Then you can use the _set _error () form, as for any other validation error, but I understand that this is unacceptable?

0
source