How to hook user registration page? Basically I want to save some cookies when user comes on the register page through an affiliate link. I used hook_user_view but it is working only when user is logged in. Can someone please tell me how to do that?


1 Answer 1


Implement hook_form_alter() and check $form_id == 'user_register_form'


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.