2017 © Pedro Peláez
 

cakephp-plugin captcha

Captcha plugin for CakePHP.

image

cybernostics/captcha

Captcha plugin for CakePHP.

  • Thursday, October 22, 2015
  • by wjase
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Captcha Plugin for CakePHP

The Captcha plugin allows you to add captcha checks on selected forms., (*1)

  1. Install the plugin in Plugins folder
  2. Add the captcha input on your selected view (eg register.ctp)

eg:, (*2)

CaptchaInput->captcha_input(); ?>
  1. Add the following to the controller method which handles the form: (assuming your controller uses a User model), (*3)

    public function your_controller_method() { // enable check captcha for create $this->YourModelNameHere->Behaviors->load('CaptchaCreator.CaptchaCheck');, (*4)

    if ($this->request->is('post')) {
        $this->YourModelNameHere->create(); // captcha will now be checked
        if ($this->YourModelNameHere->save($this->request->data)) {
            $this->Session->setFlash(__('The XYZ has been saved.'));
            return $this->redirect(array('action' => 'index'));
        } else {
            $this->Session->setFlash(__('The XYZ could not be saved. Please, try again.'));
        }
    }

    }, (*5)

Other methods like admin screens can still create records without the captcha validation getting in your way. The validation rule is only enabled when you request it., (*6)

Requirements

  • CakePHP 2.5+
  • PHP 5.2.8+
  • Lib GD

Contributing

Pull requests welcome., (*7)

License

Copyright 2007-2014 Cybernostics Pty. All rights reserved., (*8)

Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file., (*9)

The Versions

22/10 2015

dev-master

9999999-dev http://github.com/Cybernostics/captcha

Captcha plugin for CakePHP.

  Sources   Download

MIT

The Requires

 

plugin cakephp captcha