File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 7777 $ _SESSION ['errMsg ' ] = "found $ name. " ;
7878 rescueUser ($ db , "name " , $ name );
7979 } elseif ($ db ->checkUser ('email ' , $ email )) {
80- echo "found email $ email " ;
8180 $ _SESSION ['errMsg ' ] = "found $ email. " ;
82- die ( " STILL BEING IMPLEMENTED " ); // will go to rescueUser($db, "email", $email);
81+ rescueUser ($ db , "email " , $ email );
8382 } else {
8483 $ _SESSION ['errMsg ' ] = "No username or email matched: $ name " ;
8584 header ("Location: " . $ ACC_URL ."/rescue.php " );
8685 }
8786 } elseif ($ _POST ['go ' ] == 'passwordReset ' ) {
8887 $ hashed = password_hash ($ _POST ['password ' ], PASSWORD_DEFAULT );
89- $ query = "UPDATE users SET password =' " .$ hashed ."', WHERE email = ' " .$ _POST ['email ' ]."' " ;
88+
89+ $ query = "UPDATE users SET password =' " .$ hashed ."' WHERE email = ' " .$ _POST ['email ' ]."' " ;
9090 $ db ->runQuery ($ query );
9191 header ("Location: " . $ ACC_URL ."/rescue.php?go=success " );
9292
Original file line number Diff line number Diff line change 3232 <h1>Please enter your password</h1>
3333 <form action="<?php echo ($ ACC_URL ."auth-login.php " ); ?> " method="post">
3434 <input type="hidden" name="go" value="passwordReset">
35- <input type="hidden" name="email" value="<?php echo $ _POST [ ' email ' ]; ?> ">
35+ <input type="hidden" name="email" value="<?php echo $ _GET [ ' go ' ]; ?> ">
3636 <div class="error-msg"><?php if (isset ($ _SESSION ['errMsg ' ])) {
3737 echo "<span style= \"color: red; \"> " . $ _SESSION ['errMsg ' ] . "</span> " ;
3838 unset($ _SESSION ['errMsg ' ]);
You can’t perform that action at this time.
0 commit comments