Update all SQL queries, query result references, and ColdFusion code to match
the renamed database schema. Tables use plural CamelCase, PKs are all `ID`,
column prefixes stripped (e.g. BusinessName→Name, UserFirstName→FirstName).
Key changes:
- Strip table-name prefixes from all column references (Businesses, Users,
Addresses, Hours, Menus, Categories, Items, Stations, Orders,
OrderLineItems, Tasks, TaskCategories, TaskRatings, QuickTaskTemplates,
ScheduledTaskDefinitions, ChatMessages, Beacons, ServicePoints, Employees,
VisitorTrackings, ApiPerfLogs, tt_States, tt_Days, tt_AddressTypes,
tt_OrderTypes, tt_TaskTypes)
- Rename PK references from {TableName}ID to ID in all queries
- Rewrite 7 admin beacon files to use ServicePoints.BeaconID instead of
dropped lt_Beacon_Businesses_ServicePoints link table
- Rewrite beacon assignment files (list, save, delete) for new schema
- Fix FK references incorrectly changed to ID (OrderLineItems.OrderID,
Categories.MenuID, Tasks.CategoryID, ServicePoints.BeaconID)
- Update Addresses: AddressLat→Latitude, AddressLng→Longitude
- Update Users: UserPassword→Password, UserIsEmailVerified→IsEmailVerified,
UserIsActive→IsActive, UserBalance→Balance, etc.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
103 lines
No EOL
3.7 KiB
Text
103 lines
No EOL
3.7 KiB
Text
<cfparam name="url.UUID" default="0">
|
|
|
|
<cfparam name="session.Userid" default="0">
|
|
<cfparam name="request.Userid" default="0">
|
|
<cfset session.Userid = 0>
|
|
<cfset request.Userid = 0>
|
|
|
|
<cfquery name="get_user" datasource="#application.datasource#">
|
|
ID AS UserID
|
|
WHERE UUID = '#url.UUID#'
|
|
AND
|
|
IsEmailVerified = 0
|
|
AND
|
|
UserIsMobileVerified = 1
|
|
</cfquery>
|
|
|
|
<cfif get_user.recordcount EQ 1>
|
|
|
|
<cfquery name="update_User" datasource="#application.datasource#">
|
|
UPDATE Users
|
|
SET IsEmailVerified = 1
|
|
WHERE UserID = '#get_user.ID#'
|
|
</cfquery>
|
|
|
|
<!--- might as well log them in since they confirmed successfully, probably a bad idea but not worried about it for now --->
|
|
|
|
<!--- Update the session variables and request variables --->
|
|
<cflock timeout="60" throwontimeout="Yes" type="EXCLUSIVE" scope="SESSION">
|
|
<cfset session.UserID = #get_user.ID#>
|
|
<!--- Re-duplicate them --->
|
|
<cfset request.UserID = Duplicate(session.UserID)>
|
|
</cflock>
|
|
|
|
<cfmodule template="#application.wwwrootprefix#modules/notifier.cfm"
|
|
domain="box.payfrit.com"
|
|
from_email="admin@payfrit.com"
|
|
to_email="#get_user.EmailAddress#"
|
|
subject="Welcome to Payfrit!"
|
|
email_body="Thanks for confirming your Yelp For Exes account! Go rate your exes!!"
|
|
>
|
|
|
|
ok your account is all confirmed and you are logged in!<br><br>
|
|
|
|
it's time to go <cfoutput><a href="#application.httpsprefix#index.cfm">check out Yelp For Exes!!</a></cfoutput><br>
|
|
|
|
<cflocation url="index.cfm?userstatus=new">
|
|
|
|
<cfelse>
|
|
|
|
<cfquery name="get_confirmed_customer" datasource="#application.datasource#">
|
|
ID AS UserID
|
|
WHERE UUID = '#url.UUID#'
|
|
AND
|
|
IsEmailVerified = 0
|
|
AND
|
|
UserIsMobileVerified = 0
|
|
</cfquery>
|
|
|
|
<cfif get_confirmed_customer.recordcount EQ 1>
|
|
|
|
<cfquery name="update_User" datasource="#application.datasource#">
|
|
UPDATE Users
|
|
SET IsEmailVerified = 1
|
|
WHERE UserID = '#get_confirmed_customer.UserID#'
|
|
</cfquery>
|
|
|
|
your email was confirmed but we<br>still need to verify your mobile number!<br><br>
|
|
|
|
<cfset customer_OPT_confirm = round(rand()*899996+100000)>
|
|
|
|
<cfquery name="update_OPT_confirm" datasource="#application.datasource#">
|
|
UPDATE Users
|
|
SET MobileVerifyCode = '#customer_OPT_confirm#'
|
|
WHERE UserID = #get_confirmed_customer.UserID#
|
|
</cfquery>
|
|
|
|
<cfset isMessageSent = application.twilioObj.sendSMS(recipientNumber=#get_confirmed_customer.ContactNumber#, messageBody = "Payfrit six-digit code is #customer_OPT_confirm#, please input it into your registration page, or tap here: https://payfr.it/confirm_mobile.cfm")>
|
|
|
|
we just sent a six digit code to <cfoutput>#get_confirmed_customer.ContactNumber#</cfoutput><br><br>please input that code here:<br><br>
|
|
|
|
<script language="JavaScript">
|
|
function submitformconfirmmobile()
|
|
{
|
|
document.myformconfirmmobile.submit();
|
|
}
|
|
</script>
|
|
|
|
<form action="confirm_mobile.cfm" method="post" name="myformconfirmmobile" id="myformconfirmmobile" style="display:inline;">
|
|
|
|
<input type="text" size="5" maxlength="6" name="OTP"> <a href="javascript: submitformconfirmmobile()">confirm mobile</a>
|
|
|
|
<cfoutput><input type="hidden" name="UUID" value="#url.UUID#"></cfoutput>
|
|
<input type="hidden" name="mode" value="confirm">
|
|
|
|
</form><br>
|
|
|
|
<cfelse>
|
|
|
|
you shouldn't be here, <a href="mailto:admin@payfrit.com">email</a> us if you need help with something.<br>
|
|
|
|
</cfif>
|
|
|
|
</cfif> |