MyBB Community Forums

Full Version: member.php modification
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
$user = array(
		"username" => $_POST['username'],
		"password" => $_POST['pass'],
		"password2" => $_POST['pass'],
		"email" => $_POST['email'],
		"email2" => $_POST['email'],
		"usergroup" => $usergroup,
		"referrer" => "admin",
		"timezone" => "-5",
		"language" => "english",
		"profile_fields" => "Array ( [fid1] => Array ( [0] => ".$pLocation." ),[fid3] => Array ( [0] =>  ".$pSex." ) )",
		"regip" => $session->ipaddress,
		"longregip" => my_ip2long($session->ipaddress),
		"coppa_user" => "0",
	);

I'm trying to force a value for a multi select custom profile field for Location at registration. What would be an example array that I could pass in "profile_fields" =>

Thank you in advance for any help.

(2012-08-23, 09:54 PM)hanzosteel Wrote: [ -> ]
$user = array(
		"username" => $_POST['username'],
		"password" => $_POST['pass'],
		"password2" => $_POST['pass'],
		"email" => $_POST['email'],
		"email2" => $_POST['email'],
		"usergroup" => $usergroup,
		"referrer" => "admin",
		"timezone" => "-5",
		"language" => "english",
		"profile_fields" => "Array ( [fid1] => Array ( [0] => ".$pLocation." ),[fid3] => Array ( [0] =>  ".$pSex." ) )",
		"regip" => $session->ipaddress,
		"longregip" => my_ip2long($session->ipaddress),
		"coppa_user" => "0",
	);

I'm trying to force a value for a multi select custom profile field for Location at registration. What would be an example array that I could pass in "profile_fields" =>

Thank you in advance for any help.

To further clarify, I'm trying to pass in values to the custom profile fields of Location and Sex.