The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hooks & User Profile field updation
I've written a plugin-script which is triggererd by usercp_complete .it will then update the Profile_status which is 'field6' in vb Userfield.
PHP Code:
Code:
Fatal error: Field field6 is not defined in $validfields in class vb_datamanager_user in /includes/class_dm.php on line 485 |
#2
|
||||
|
||||
Well, I think the error gives it away. Look in the class file, and look at the error.
|
#3
|
|||
|
|||
I don't think that would help too much coz I cant change any stuff in the core vB PHP codes anyway.And the userfield of interest to me is not a standard vb core field like 'email' or 'referer' so its not set in the class anyway , it was defined by me in the Profile field section of the Admin CP and its named 'field6' by vB.basically what i wanna do is:
Edit the value of field6 in vb table 'usefield' , but I'd like to do so via vB & not by a mysql/php hack. With this in mind, which Data Manager should I use? admin , user , post ....? Thanks |
#4
|
||||
|
||||
You can add a "validfield" without changing vBulletin core files... Just add to the array.
|
#5
|
|||
|
|||
Hi Dismounted,
I am trying to do something similar. ( add a value to a profile filed which will be posted (POST method) to register.php Which array do I need to add to, whats the location of the array? Thanks Grant |
#6
|
||||
|
||||
chuanjet ... why would you be adding a custom profile field to the User dm in the first place? Custom fields aren't a part of the user dm, as that error message is telling you!
Easiest way would probably be to hang your plugin on the profile_start hook, check if $_POST['do'] is 'updateprofile', and if so poke your field6 value into the $_POST['userfield'] array, something like this: PHP Code:
-- hugh |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|