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 | |
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.
-rwxr-xr-x | pages/login.php | 32 | ||||
-rwxr-xr-x | theme/login.tpl | 7 |
2 files changed, 10 insertions, 29 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 | ||
diff --git a/theme/login.tpl b/theme/login.tpl index f175f59..7f83045 100755 --- a/theme/login.tpl +++ b/theme/login.tpl | |||
@@ -9,10 +9,9 @@ To post feedback on this site, and also to post on the forums, you must be a mem | |||
9 | Sadly, currently membership is invitation-only. But hopefully that will change in the near future.<BR> | 9 | Sadly, currently membership is invitation-only. But hopefully that will change in the near future.<BR> |
10 | HOWEVER, you may request membership by email hatkirby@fourisland.com (link on the right).<BR> | 10 | HOWEVER, you may request membership by email hatkirby@fourisland.com (link on the right).<BR> |
11 | A NOTICE TO ALL MEMBERS! Do NOT share your password with anyone! If you misplace your password send an email to hatkirby@fourisland.com (link on the right).<P> | 11 | A NOTICE TO ALL MEMBERS! Do NOT share your password with anyone! If you misplace your password send an email to hatkirby@fourisland.com (link on the right).<P> |
12 | <FORM ACTION="login.php?submit=" METHOD="POST"> | 12 | <FORM ACTION="login.php?submit=" METHOD="POST"> |
13 | <LABEL FOR="username">Username:</LABEL><INPUT TYPE="text" NAME="username" ID="username"><BR> | 13 | <LABEL FOR="username">Username:</LABEL><INPUT TYPE="text" NAME="username" ID="username"><BR> |
14 | <LABEL FOR="password">Password:</LABEL><INPUT TYPE="password" NAME="password" ID="password"><BR> | 14 | <LABEL FOR="password">Password:</LABEL><INPUT TYPE="password" NAME="password" ID="password"><BR> |
15 | <!--RECAPTCHA--> | 15 | <INPUT TYPE="hidden" NAME="redirect" VALUE="<!--REDIRECT-->"> |
16 | <INPUT TYPE="hidden" NAME="redirect" VALUE="<!--REDIRECT-->"> | ||
17 | <INPUT TYPE="submit"> | 16 | <INPUT TYPE="submit"> |
18 | </FORM></CENTER> | 17 | </FORM></CENTER> |