diff options
| author | root | 2015-10-26 19:31:08 +0100 |
|---|---|---|
| committer | root | 2015-10-26 19:31:08 +0100 |
| commit | dc904a00f00e38f5db2f867bfc1d99f2ebd13cc7 (patch) | |
| tree | 6f634dba624a63a1c9ebc0a6c3f143d7e65c138f /action.php | |
| parent | 6eeea9a2a84936a37b74078c727c06351765adab (diff) | |
| parent | 067a3863fe3d801ae6384dd5a904b9ad408dd3cc (diff) | |
| download | jungegemeinde-dc904a00f00e38f5db2f867bfc1d99f2ebd13cc7.tar.gz | |
Merge branch 'testing' of git.iamfabulous.de:jungegemeinde into testing
Diffstat (limited to 'action.php')
| -rw-r--r-- | action.php | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -384,6 +384,41 @@ JG Adlershof"; redirect("gallery&gallery=".$_GET["gallery"]); } break; + case("genHash"): + if ( $_SERVER['REQUEST_METHOD'] != 'POST' ){ + header($_SERVER["SERVER_PROTOCOL"] . " 405 Method Not Allowed"); + ob_clean(); + echo "Method not allowed"; + exit; + } + if ( ! $user->setHash($_REQUEST["name"], $c) ) { + print_login("password"); + } else { + print_verify_by_email(); + } + + + case("verify"): + if ( $_SERVER['REQUEST_METHOD'] != 'GET' ){ + header($_SERVER["SERVER_PROTOCOL"] . " 405 Method Not Allowed"); + ob_clean(); + echo "Method not allowed"; + exit; + } + //lredirect( "login"); + if ( ! isset($_REQUEST["name"]) || $_REQUEST["name"] == "" || ! isset($_REQUEST["hash"]) || $_REQUEST["hash"] == "" ){ + print_login("missing"); + } else if ( $user->loginByEmail($_REQUEST["name"], $_REQUEST["hash"], $c) ){ + $goto = preg_replace("/;/", "&", $_GET["goto"]); + header($_SERVER["SERVER_PROTOCOL"] . " 302 Moved"); + header("Location: ".DOMAIN."?page=" . $goto); + ob_clean(); + exit; + } else { + print_login("password"); + } + break; + default: print_404(); break; |
