diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2008-11-19 18:25:43 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2008-11-19 18:25:43 -0500 |
commit | 006b557637ef31a841c8f3be7079def46bf91b11 (patch) | |
tree | da66225e7f1e049746d505e26f5e4a4db8e922b2 /pages/login.php | |
parent | 13f667118d905bb6c3bf1414b6596f3a451185ba (diff) | |
download | fourisland-006b557637ef31a841c8f3be7079def46bf91b11.tar.gz fourisland-006b557637ef31a841c8f3be7079def46bf91b11.tar.bz2 fourisland-006b557637ef31a841c8f3be7079def46bf91b11.zip |
Removed reCaptcha from Login page
Really, there is no reason to have a CAPTCHA on a Login page. reCaptcha can be re-added to Four Island when a registration page is created.
Diffstat (limited to 'pages/login.php')
-rwxr-xr-x | pages/login.php | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/pages/login.php b/pages/login.php index 6270502..690a0e8 100755 --- a/pages/login.php +++ b/pages/login.php | |||
@@ -24,38 +24,20 @@ require('headerproc.php'); | |||
24 | 24 | ||
25 | $noMembers=1; | 25 | $noMembers=1; |
26 | 26 | ||
27 | include('includes/recaptchalib.php'); | ||
28 | $publickey = "6LfgvgEAAAAAAG_BJMkWk8sNcT1nBaGoXKJYb-JT"; | ||
29 | $privatekey = "6LfgvgEAAAAAAD0_UVLp57MU7tqcypsbZPS9qTnr"; | ||
30 | |||
31 | if (!isset($_GET['submit'])) | 27 | if (!isset($_GET['submit'])) |
32 | { | 28 | { |
33 | $template = new FITemplate('login'); | 29 | $template = new FITemplate('login'); |
34 | $template->add('REDIRECT',$_GET['redirect']); | 30 | $template->add('REDIRECT',$_GET['redirect']); |
35 | |||
36 | $template->add('RECAPTCHA',recaptcha_get_html($publickey)); | ||
37 | } else { | 31 | } else { |
38 | $resp = recaptcha_check_answer($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); | 32 | if (verifyUser($_POST['username'], $_POST['password'])) |
39 | if (!$resp->is_valid) | ||
40 | { | 33 | { |
41 | $template = new FITemplate('login'); | 34 | sess_set('uname',$_POST['username']); |
42 | $template->add('REDIRECT',$_GET['redirect']); | 35 | header('Location: ' . rawurldecode($_POST['redirect'])); |
43 | $template->adds_block('ERROR',array('msg' => "The reCAPTCHA wasn't entered correctly. Go back and try it again. (reCAPTCHA said: " . $resp->error . ")")); | 36 | exit; |
44 | |||
45 | $template->add('RECAPTCHA',recaptcha_get_html($publickey)); | ||
46 | } else { | 37 | } else { |
47 | if (verifyUser($_POST['username'], $_POST['password'])) | 38 | $template = new FITemplate('login'); |
48 | { | 39 | $template->add('REDIRECT',$_POST['redirect']); |
49 | sess_set('uname',$_POST['username']); | 40 | $template->adds_block('ERROR',array('MSG' => "The username/password pair didn't resolve to a real user. Try logging on again, spelling the password right, or making sure you actually have an a account.")); |
50 | header('Location: ' . rawurldecode($_POST['redirect'])); | ||
51 | exit; | ||
52 | } else { | ||
53 | $template = new FITemplate('login'); | ||
54 | $template->add('REDIRECT',$_POST['redirect']); | ||
55 | $template->adds_block('ERROR',array('MSG' => "The username/password pair didn't resolve to a real user. Try logging on again, spelling the password right, or making sure you actually have an a account.")); | ||
56 | |||
57 | $template->add('RECAPTCHA',recaptcha_get_html($publickey)); | ||
58 | } | ||
59 | } | 41 | } |
60 | } | 42 | } |
61 | 43 | ||