Additional field during login?
-
I need to add an additional field to the wordpress login page that will allow us to track a customer_id parameter.
Is there a way to add a parameter $customer_id to wp_login without directly hacking user.php?
I have added the field with:
add_action('login_form','add_customer_id');
I can manually hack user.php from:
do_action('wp_login', $credentials['user_login']);
to:
do_action('wp_login', $credentials['user_login'],<strong>$customer_id</strong>);
I capture the $_POST[‘customer_id’] and pass it to wp_login:
add_action('wp_login','capture_customer_id',10,2);
- The topic ‘Additional field during login?’ is closed to new replies.