MyBB Community Forums

Full Version: Assigning Custom Profile Fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Up.

Quote:How do I assign the default profile field to newly registered members automatically?
(2011-10-09, 07:45 PM)Solidus Wrote: [ -> ]Up.

Quote:How do I assign the default profile field to newly registered members automatically?

Hmm, I'm not sure why
$db->query("UPDATE `mybb_userfields` SET fid30='default value' WHERE username='".$user_info)['username']."'"); 
doesn't work. I'll look into this...
I think it's easier to add the query to cron.daily, is this correct? (I want to exclude myself)

UPDATE `mybb_userfields` SET fid30='default value' WHERE fid30='' WHERE ufid!='2'
Yeah, that should work.
Syntax error.
Oh, whoops, you can't have two WHERE statements. I gtg right now but I'll get back to you.
UPDATE `mybb_userfields` SET fid30='default value' WHERE fid30='' AND ufid!='2'

Maybe.
(2011-10-15, 09:46 PM)Solidus Wrote: [ -> ]
UPDATE `mybb_userfields` SET fid30='default value' WHERE fid30='' AND ufid!='2'

Maybe.

That should work, yes.
Pages: 1 2