Index: branches/unlabeled/unlabeled-1.65.2/kernel/frontaction.php =================================================================== diff -u -r3962 -r3972 --- branches/unlabeled/unlabeled-1.65.2/kernel/frontaction.php (.../frontaction.php) (revision 3962) +++ branches/unlabeled/unlabeled-1.65.2/kernel/frontaction.php (.../frontaction.php) (revision 3972) @@ -462,7 +462,25 @@ $dob = adodb_mktime(0, 0, 0, $_POST['dob_month'], $_POST['dob_day'], $_POST['dob_year']); $ip = $_SERVER['REMOTE_ADDR']; - $u = &$objUsers->Add_User($_POST["username"], md5($password), $_POST["email"], $CreatedOn, $_POST["firstname"], $_POST["lastname"], $Status, $_POST["phone"], $_POST["street"], $_POST["city"], $_POST["state"], $_POST["zip"], $_POST["country"], $dob, $ip, TRUE); + $fields_hash = Array('Login' => $_POST['username'], + 'Password' => md5($password), + 'FirstName' => $_POST['firstname'], + 'LastName' => $_POST['lastname'], + 'Company' => $_POST['company'], + 'Email' => $_POST['email'], + 'Status' => $Status, + 'Phone' => $_POST['phone'], + 'Fax' => $_POST['fax'], + 'Street' => $_POST['street'], + 'Street2' => $_POST['street2'], + 'City' => $_POST['city'], + 'State' => $_POST['state'], + 'Zip' => $_POST['zip'], + 'Country' => $_POST['country'], + 'CreatedOn' => $CreatedOn, + 'dob' => $dob, + 'ip' => $ip); + $u =& $objUsers->Add_User_NEW($fields_hash, true); if(!is_object($u)) { @@ -602,17 +620,29 @@ $u =& $objUsers->GetItem($UserId); $status = $u->Get("Status"); $dob = adodb_mktime(0, 0, 0, $_POST['dob_month'], $_POST['dob_day'], $_POST['dob_year']); - if(strlen($_POST["password"])>0) - { - $password = md5($_POST["password"]); - } - else - $password = ""; - $objUsers->Edit_User($UserId, $_POST["username"], $password, $_POST["email"], 0, - $_POST["firstname"], $_POST["lastname"], $status, $_POST["phone"], - $_POST["street"], $_POST["city"], $_POST["state"], $_POST["zip"], - $_POST["country"], $dob, $_POST['MinPwResetDelay']); + $password = strlen($_POST["password"]) > 0 ? md5($_POST["password"]) : ''; + $fields_hash = Array( 'Login' => $_POST['username'], + 'FirstName' => $_POST['firstname'], + 'LastName' => $_POST['lastname'], + 'Company' => $_POST['company'], + 'Email' => $_POST['email'], + 'Status' => $status, + 'Phone' => $_POST['phone'], + 'Fax' => $_POST['fax'], + 'Street' => $_POST['street'], + 'Street2' => $_POST['street2'], + 'City' => $_POST['city'], + 'State' => $_POST['state'], + 'Zip' => $_POST['zip'], + 'Country' => $_POST['country'], + 'dob' => $dob, + 'MinPwResetDelay' => $_POST['minpwresetdelay'], + + ); + + $user =& $objUsers->Edit_User_NEW($UserId, $fields_hash); + $ResourceId= $u->Get("ResourceId"); $objCustomDataList->LoadResource($ResourceId); $objCustomFields = new clsCustomFieldList(6);