HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to add custom fields to registration...
kachan64
New
I am **** tired and I'm trying to write this quickly as possible.
Took me a lot of tries on editing class.usermodel.php and finally got it working.
$UserID = $this->SQL->Insert($this->Name, $Fields);
That thing above was actually for username, i tried to follow that and do my own field and did not work...
Finding and searching on forums also no luck to me.
- OPen your datbase the vanilla one.
- Open up the user table and add a filed called 'Whatever' (Whatever will be changed to whatever you call it)
- Open up register*.php and copy the li tag from the name filed (cuz is easier) and just remove the error fail bit and change both 'name' with the quotes to your own. best is to follow up the 'whatever' field from the database.
- THen open up class.usermodel.php and above the code I just listed add:
$WhateverID = $_POST['whatever'];
Change WhateverID to what you did before.
Change WhatEver to what you use before.
and done!
thanks for reading hope not to bad... Back to bed thx.
0
Comments
In the latest version of Vanilla (not sure if this exists in 2.0.18.4), the way to do this would be 1) Enable the Profile Extender plugin. 2) Type 'Whatever' into the Registration Fields text box and save.
Hello Lincoln:
I see ist a old post but, Is any pluging like Extender or similar for 2.0.18.4?
Thanks
@Lincoln I modified one of the SSO plugins and added the following:
$Form->SetFormValue('Twitter', GetValue('twitter', $Profile['response']['user']['contact']));
$Form->SetFormValue('Facebook', GetValue('facebook', $Profile['response']['user']['contact']));
However, the form fields do not get filled in. How should one handle this with your Profile Extender plugin?
Thanks,
Gary