Need help comparing URL query parameter to database value

Hi Wapplers!

I’m trying to create my signup confirmation process and having a hard time with the confirmation email verification.

What I’m wanting to accomplish is:

  1. A new user clicks a link in their email
  2. Once the webpage loads it compares the url parameter to the value in the “confirm_key” field on their user record.
  3. If they match, then it updates the User record’s “Confirmed” field from 0 to 1 and then redirects the user to the homepage.

I am stuck on number 2 above.

The URL that is sent to the user looks like this.
https://mywebsite.com/confirm?confirm_key=b44622294a31071861c1

Community Page
Last updated: