View Full Version : Field xxxx is not defined in $validfields in class vb_datamanager_user
sv1cec
07-15-2005, 09:21 AM
Never mind, I found the answer. Every time you define a new column in the user table, you have to define it in the class_dm_user.php file as well. Anyone cares to let us know for which other tables this is true?
Andreas
07-16-2005, 01:30 AM
Every time you define a new column in the user table, you have to define it in the class_dm_user.php file as well.
This is not true.
Hookname: userdata_start
$this->validfields['mystrfield'] = array(TYPE_STR, REQ_NO);
$this->validfields['myuintfield'] = array(TYPE_UINT, REQ_NO);
sv1cec
07-16-2005, 03:55 AM
KirbyDE,
Thanks.
So what you are saying, is that if someone defines new columns in user table, one should create a plugin, hooked at userdata_start, with the definiitions of the new columns?
A couple more questions, if you would allow me:
Which other tables are treated the same way? In other words, for which other tables, we should define custom columns in this way?
Are the types used in this declaration described some where? INT, UINT, STR, what are the others supported? For example, I used to have STR_NOHTML in globalize function before, is this still supported?
Thanks and rgds
All datamanagers.
You can find definitions of the things you're asking about in (i think init.php), but if you do a search for a define('TYPE youll find it.
sv1cec
07-18-2005, 10:57 AM
Thank you Sir, appreciated.
I assume you mean whatever has a class_dm_xxx.php file in the includes directory?
Thanks
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.