Created
July 28, 2016 20:15
-
-
Save devintyler/bb37f7d84326c407e9c78903c761bb52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Standard Global Variables | |
// Get new password and randomCode from ARGS | |
// First check to see if their randomCode matches a reset object in checkCode() | |
// checkCode() | |
// filter variable with "_eq":code | |
// 'list' data objects from password_resets Class with filter | |
// store returned data in global variables (owner ID etc.) | |
// if exists, you can check to see if it's been used already, and set confirmed to true if not | |
// if not, you can move on below to resetUser() | |
// resetUser() | |
// variable with username and password | |
// First API call is to 'update' the user with the username and new password - user(ownerId) -> update | |
// this resets the password | |
// if successful, reset the userkey with the user -> resetKey call | |
// this is for extra security | |
// then send a final password changed email through SendGrid or Mailgun |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment