View Full Version : Add user profiles and update all to YES ???
Scalemotorcars
10-20-2011, 03:45 PM
I looked around and didn't really see the answer so sorry if its been covered.
What Im trying to do is add a profile field that's either yes or no. Ive added the field using the Single-Selection Radio Buttons and with the first option as default.
No problem but when I check my users profiles it doesn't show either of the options as default.
How can I set all my members to have the first (yes) option set to default?
Thanks.
Lynne
10-20-2011, 04:18 PM
When you first created the field, did you set a default of Yes? If you did not, and you changed it to be that way later, then it will not change what you had initial set for the users - it will only change it for future registered users. You would need to manually alter your database. Once the field is created for the users, it will stay as created in the database.
Scalemotorcars
10-20-2011, 04:32 PM
Thanks Lynne
I went ahead and just created a new one since its only 2 days old and set the first option as default. Then checked a random profile and still neither option is ticked.
So if its a Yes or No option and Yes is on the first line its still set as Yes in the database regardless of what it says in the profile. Or did I miss something again.
Lynne
10-20-2011, 04:43 PM
So when you created it, you had for the first line in Options, "Yes" (and second line is "No" - no quotes) and the you had Set Default (radio button) set to Yes also? Field Editable by User is Yes? Perhaps post a screen cap of your settings.
It is kind of strange...seems if you create a single-selection radio button field with Yes and No options, and select 'Yes" to the default, the field will still have no value in the database (and on the user profile page in the adminCP) until the user edits their settings. The field does show the default selected when the user visits the profile page, but it won't actually have a value until the settings are saved.
Scalemotorcars
10-20-2011, 04:55 PM
Screen shot.
Lynne
10-20-2011, 05:04 PM
And you have Display Page set to be Edit Profile? I did this same thing on my site and it is showing Yes for the users on the Profile Page.
Scalemotorcars
10-20-2011, 05:22 PM
Yes its on the Edit Profile page.
If I open my profile it simply says N/A with the option it edit it manually. In my profile in the CP neither are ticked.
I just tried to rebuild broken user profiles and no change to anyone's profile.
Lynne
10-20-2011, 05:29 PM
I suppose you can just alter the database to have Yes set as default.
Scalemotorcars
10-20-2011, 05:34 PM
I can run a query from the CP but I have no ideal what to use.
And did I say thank you yet?
Lynne your the best !!!
https://vborg.vbsupport.ru/external/2011/10/25.jpg
Lynne
10-20-2011, 05:43 PM
Could just run this (change table name if you have a prefix):
UPDATE userfield SET field6='Yes';And, as always, backup your database before running any query on it!!!
Scalemotorcars
10-20-2011, 05:49 PM
Sorry I dont follow. As in VB prefix. I use a custom value. So basically it would look something like this?
UPDATE vb123_userfield SET fieldXX='Yes';
Lynne
10-20-2011, 10:26 PM
If your vb prefix is "vb123_", then yes, that is what it would look like.
Scalemotorcars
10-22-2011, 12:29 AM
Thanks again Lynne, time to do a backup and give it a shot.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.