We have an admin controlled user system where there are roles, but not open registration. We would like to do 2 things.
- add a required “terms agreement” checkbox to all login forms
- update a custom field in the user profile to show it has been checked
I cannot see how to add anything to the s2Member login form, but was able to add something to the normal WP login form, so need to get this sorted out.
I also can’t seem to get the update_user_option to fire at the correct time after we have a valid login.
I tried using the wp_login hook but it wasn’t impacted by the s2Member login form or custom role users.
I’ve also tried wp_authenticate, but this can’t return a logged in user before firing because of the firing order.
Any suggestions on both adding the custom field to the login form AND updating the value in the user profile after successful login?