An anonymous user cookie has to be created when user submits the registration form with user details.
Basically I want to have a check to see if the cookie value is sent before I login.
Can anybody point me in that direction?
An anonymous user cookie has to be created when user submits the registration form with user details.
Basically I want to have a check to see if the cookie value is sent before I login.
Can anybody point me in that direction?
Hmm...not sure that I fully understand what you want to achieve here, but you should interrupt registration process at some point and do your cookie stuff. So you must have your module and register hook funciton which will do the job.
Candidates are:
https://api.drupal.org/api/drupal/modules%21user%21user.api.php/function/hook_user_insert/7.x
https://api.drupal.org/api/drupal/modules!user!user.api.php/function/hook_user_presave/7.x
or maybe even check when webform is submitted:
Register one of those, and place your code there so it will be called when user is going to be saved (or form is submitted) .