Function Gen_CRM_Creds($aausername = [username]) { // Include Backend library include '/usjbcom/butler/include/Butler.php'; $vce = "Nothing"; $cbUser =& CBuser::getInstance($user->$aausername); $email = getField('email', null, 'csv', 'none', 'profile', 'list'); $firstname = getField('firstname', null, 'csv', 'none', 'profile', 'list'); $lastname = getField('lastname', null, 'csv', 'none', 'profile', 'list'); // See if the email is already in the backend system $vce = VtChkEmail($email); if (($vce == "") || ($vce == "0")) { //If no email, then insert user from cb data $RandPass = Vt_Rand_Str(14); $New_User_Id = VtInsert( $newuser = $aausername, $newpass = $RandPass, $newemail = $email, $newfirstname = $firstname, $newlastname = $lastname ); } elseif ($vce == "1") { echo "Email Address already exists. Contact the Administrator." . "
"; } Return $New_User_Id; }