MyBB Community Forums

Full Version: Grabbing input value onregister
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright so I'm making a plugin that needs to grab a value entered into a custom field on the registration page. The custom field is created successfully and the value is successfully read from it. What I need now is to take this input value and add it to the user that is registering's row in the 'users' table. The problem I'm having is, the user hasn't been created yet, since I'm running this on the 'datahandler_user_validate' hook, and therefore I can't insert into the database based on 'uid'. I've tried inserting into the db whereusername = $mybb->insert['username'], but that still doesn't work, as I don't think that any user data has been inserted, so the row doesn't even exist yet.

Is there another hook that I should use or any way to do this you guys can think of? Thanks! Cool