Discussions
Activity
Sign In
How it works
Newscoop Themes
CAPTCHA validation?
Vote Up
0
Vote Down
Sebastian Olsson (2)
October 2011
Posts: 121
Member
I have added a CAPTCHA to the create user form, because users were being registered with random info.
The form looks like this:
<p>{{ user_form template="register.tpl" submit_button="Create User" }}
<table>
<tr><td>Name:</td><td>{{ camp_edit object="user" attribute="name" }}</td></tr>
<tr><td>Username:</td><td>{{ camp_edit object="user" attribute="uname" }}</td></tr>
<tr><td>Password:</td><td>{{ camp_edit object="user" attribute="password" }}</td></tr>
<tr><td>Password again:</td><td>{{ camp_edit object="user" attribute="passwordagain" }}</td></tr>
<tr><td>E-Mail:</td><td>{{ camp_edit object="user" attribute="email" }}</td></tr>
<tr><td>City:</td><td>{{ camp_edit object="user" attribute="city" }}</td></tr>
<tr><td>Country:</td><td>{{ camp_select object="user" attribute="country" }}</td></tr>
<tr><td>Phone:</td><td>{{ camp_edit object="user" attribute="phone" }}</td></tr>
<tr><td colspan="2"><img src="{{ captcha_image_link }}"></td></tr>
<tr><td>Code:</td><td>{{ camp_edit object="captcha" attribute="code" }}</td></tr>
</td><td colspan="2">{{ /user_form }}</td>
</table>
</p>
But the "code" field doesn't work. Type in anything or leave it blank, the user will still be registered. How do I validate the CAPTCHA?
The register.tpl template looks like this:
{{ if $campsite->edit_user_action->defined }}
{{ if $campsite->edit_user_action->ok }}
<p>User registered successfully</p>
{{ else }}
<p class="error">Could not add user: {{
$campsite->edit_user_action->error_message }}</p>
{{ include file="registerform.tpl" }}
{{ /if }}
{{ else }}
{{ include file="registerform.tpl" }}
{{ /if }}
(Version: Campsite 3.4.3)
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339