Second pass fixing 70+ references across 32 files: - Orders: DeliveryMultiplier→BusinessDeliveryMultiplier, OrderTipAmount→TipAmount, OrderPaymentCompletedOn→PaymentCompletedOn, OrderPaymentError→PaymentError - Orders PK: WHERE OrderID=? → WHERE ID=? on Orders table - OrderLineItems PK: OrderLineItemID→ID in INSERT, WHERE, and query results - Items: parent.ItemID→parent.ID in JOIN conditions - Tasks: t.TaskID→t.ID in JOIN conditions - Users PK: WHERE UserID=X → WHERE ID=X on Users table - Addresses PK: A.AddressID→A.ID in JOIN conditions - tt_States: tt_StateID→ID, remove nonexistent tt_StateCountryID/tt_StateSortOrder - tt_OrderTypes: tt_OrderTypeID→ID, tt_OrderTypeName→Name - tt_Days: D.tt_DayID→D.ID - confirm_email.cfm: Add missing SELECT/FROM to queries - setLineItem.cfm: Fix 13 old column references - Stripe webhook/payment: Fix column names and PK references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
67 lines
No EOL
1.9 KiB
Text
67 lines
No EOL
1.9 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#" dbtype="ODBC">
|
|
SELECT ID
|
|
FROM Users
|
|
WHERE UUID = '#url.UUID#'
|
|
AND
|
|
IsEmailVerified = 0
|
|
</cfquery>
|
|
|
|
<cfif get_user.recordcount EQ 1>
|
|
|
|
<cfquery name="update_Uer" datasource="#application.datasource#" dbtype="ODBC">
|
|
UPDATE Users
|
|
SET IsEmailVerified = 1
|
|
WHERE ID = #get_user.ID#
|
|
</cfquery>
|
|
|
|
<!--- might as well log them in since they confirmed successfully --->
|
|
|
|
<!--- 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="admin@payfrit.com"
|
|
subject="new confirmation"
|
|
email_body="someone just confirmed"
|
|
>
|
|
|
|
ok your account is all confirmed and you are logged in!.<br><br>
|
|
|
|
it's time to go <cfoutput><a href="index.cfm">buy some stuff!</a></cfoutput><br>
|
|
|
|
<cflocation url="index.cfm?userstatus=new">
|
|
|
|
<cfelse>
|
|
|
|
<cfquery name="get_confirmed_customer" datasource="#application.datasource#" dbtype="ODBC">
|
|
SELECT ID
|
|
FROM Users
|
|
WHERE UUID = '#url.UUID#'
|
|
AND
|
|
IsEmailVerified = 1
|
|
</cfquery>
|
|
|
|
<cfif get_confirmed_customer.recordcount EQ 1>
|
|
|
|
your account was already confirmed. go <cfoutput><a href="index.cfm">buy</a></cfoutput> some food or something!<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> |