MyBB Community Forums
How do I update custom profile fields in code? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: How do I update custom profile fields in code? (/thread-79064.html)



How do I update custom profile fields in code? - Boten Anna - 2010-09-27

I'm trying to write a plugin for my forum about an MMO that gets information about my users' main character and puts them in some hidden custom profile fields.

I'm merrily chugging along on this project but hit a surprising roadblock: I can't find any way to actually update the custom fields themselves from PHP code! Am I missing something obvious, or is it even possible?


RE: How do I update custom profile fields in code? - Tomm M - 2010-09-27

Which part are you wanting to update? Adding them, or just changing the data?

Custom Profile Fields' information is stored in the mybb_userfields table. ufid is the user's user ID. fid(x) is the corresponding id to the field in the mybb_profilefields table.


RE: How do I update custom profile fields in code? - Boten Anna - 2010-09-27

So I have to directly update the database myself? There isn't a built in method to do that?