MyBB Community Forums

Full Version: Validate user profile custom field content using MySQL data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,
first post here so I hopeĀ I'm in the right section, if not my apologies and I kindly ask someone to point me to the right section.
My problem is this: I'm setting up a board with the 1.8.8 version and I'll have the need to validate a user profile custom text-only field (already created) content, that field is not mandatory but if filled I need it to be validated with data contained in a MySQL db, is that possible?
Before to open this thread I searched for any existing and/or in development mod and/or plugin but haven't found anything (wrong terms perhaps), so I'm asking here.
Many thanks in advance.
Best regards

Angelo
MyBB 1.8 allows you to specify a regular expression for custom profile fields (ACP => Configuration => Custom Profile Fields).
Hello,
thank you for your answer.
Yes, I'm aware about regular expression but that's not what I'm looking for, I need to be sure that if the user put "ABCDE" into that field the db must contain "ABCDE" too in order to have that field validated, if not an error must be returned.
You might be able to have a plugin hook to the datahandler_user_validate hook for this.
Yes, that's very interesting, thank you very much!