The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Getting User Input in Profile
Hello,
I have created a custom field for the users profile. I need to get that value when they save their changes so I created a plugin that gets executed on the profileupdate event. However I cannot work out how to get the value that was entered in the custom field - which is field6 I have tried: PHP Code:
PHP Code:
Can someone please tell me what object or var I need to access to get the posted field value. Cheers Marc |
#2
|
|||
|
|||
erm,
if you want it in your postbit, you can use the existing code $post[fieldx] in your postbit template if you want it in the profile or members list then use the existing code $userinfo[fieldx] in the template. No need to write your own plugin to pull info that is already available at the touch of a few keys |
#3
|
|||
|
|||
The best to do this would be to use hook location 'userdata_presave' ('userdata_postsave' is probably also possible). You will be hooking directly into the Data Manager, so it will even work if you change the field from the AdminCP.
New value: $this->userfield['fieldX'] Old value: $this->existing['fieldX'] |
#4
|
|||
|
|||
Hello MarcoH64,
Than you very much for responding - your solution worked 100% ! Cheers Marc Hello peterska2, Thank you for responding. Could you please tell me where I can get information on what is a postbit. Cheers Marc |
#5
|
|||
|
|||
'postbit' or 'postbit_legacy' is the template used to display a post. She misunderstood your question i think.
|
#6
|
|||
|
|||
I did. I thought you meant getting it to display. It's what I get for replying when I'm awake instead of asleep!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|