Modified: trunk/app/controllers/users_controller.rb (2604 => 2605)
--- trunk/app/controllers/users_controller.rb 2011-06-07 12:37:46 UTC (rev 2604)
+++ trunk/app/controllers/users_controller.rb 2011-06-07 12:48:36 UTC (rev 2605)
@@ -147,10 +147,18 @@
# check that captcha was entered correctly
unless RAILS_ENV == 'test'
- if !captcha_valid?(params[:validation][:captcha_id], params[:validation][:captcha_validation])
- flash.now[:error] = 'Verification text was not entered correctly - please try again.'
- render :action ="" 'new'
- return
+ if true
+ if !verify_recaptcha()
+ flash.now[:error] = 'Recaptcha text was not entered correctly - please try again.'
+ render :action ="" 'new'
+ return
+ end
+ else
+ if !captcha_valid?(params[:validation][:captcha_id], params[:validation][:captcha_validation])
+ flash.now[:error] = 'Verification text was not entered correctly - please try again.'
+ render :action ="" 'new'
+ return
+ end
end
end
Modified: trunk/app/views/users/new.rhtml (2604 => 2605)
--- trunk/app/views/users/new.rhtml 2011-06-07 12:37:46 UTC (rev 2604)
+++ trunk/app/views/users/new.rhtml 2011-06-07 12:48:36 UTC (rev 2605)
@@ -28,6 +28,9 @@
<center>
<h2>Anti-spam verification</h2>
+ <% if true -%>
+ <%= recaptcha_tags -%>
+ <% else -%>
<table style="margin-top: 2em;">
<tr>
<td>
@@ -41,6 +44,7 @@
</td>
</tr>
</table>
+ <% end -%>
</center>
<br />