diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b74decb0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/config.php diff --git a/cache/.gitignore b/cache/.gitignore new file mode 100644 index 00000000..72e8ffc0 --- /dev/null +++ b/cache/.gitignore @@ -0,0 +1 @@ +* diff --git a/dropplets/functions.php b/dropplets/functions.php index 31322894..94f33a7c 100644 --- a/dropplets/functions.php +++ b/dropplets/functions.php @@ -53,8 +53,19 @@ $verification_file = "./verify.php"; // If verified, allow a password reset. - if (!isset($_GET["verify"])) { + if (isset($_GET["verify"])) { + require($verification_file); + + if ($_GET["verify"] === $verification_code) { + $_SESSION["user"] = true; + unlink($verification_file); + } else { + $login_error = "That's not the correct recovery code!"; + } + } + else { + // Generate verification token and send e-mail $code = sha1(md5(rand())); $verify_file_contents[] = "