Advertisement
lewissmallwood

Abstract Reset Password

Mar 15th, 2018
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. if (isset($_POST['submit'])) {
  2.     $email = trim($_POST["email"]);
  3.  
  4.     require_once(MODAL_PATH . "/user.php");
  5.     $user = User::fromEmail($email);
  6.  
  7.     if ($user->exists) {
  8.         $user->ResetPassword();
  9.     } else {
  10.         $pageData["error"] = "A user with that email address does not exist.";
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement