$Client->ZipCode = $_SESSION['wizard']['newclient']["zipcode"]; $Client->Phone = $_SESSION['wizard']['newclient']["phone"]; $Client->Fax = $_SESSION['wizard']['newclient']["fax"]; $Client->Status = CONFIG::$CLIENT_MANUAL_APPROVAL ? 0 : 1; $Client->SetSettingValue('inline_help', 1); try { foreach ((array)$_SESSION['wizard']['newclient']["add"] as $k=>$v) $Client->{$k} = $v; } catch(Exception $e){} try { $_SESSION["userid"] = $Client->Save()->ID; } catch(Exception $e) { throw new ApplicationException($e->getMessage(), $e->getCode()); } Application::FireEvent('ClientCreated', $Client); if (CONFIG::$CLIENT_MANUAL_APPROVAL == 1) { $Client->SetSettingValue("pwd", $password); mailer_send("signup_pending.eml", $args, $_SESSION['wizard']['newclient']["email"], $_SESSION['wizard']['newclient']["name"]); } else {