diff options
Diffstat (limited to 'app/Controller/CaptchaController.php')
-rw-r--r-- | app/Controller/CaptchaController.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/Controller/CaptchaController.php b/app/Controller/CaptchaController.php new file mode 100644 index 00000000..43b2f823 --- /dev/null +++ b/app/Controller/CaptchaController.php @@ -0,0 +1,29 @@ +<?php + +namespace Kanboard\Controller; + +use Gregwar\Captcha\CaptchaBuilder; + +/** + * Captcha Controller + * + * @package Kanboard\Controller + * @author Frederic Guillot + */ +class CaptchaController extends BaseController +{ + /** + * Display captcha image + * + * @access public + */ + public function image() + { + $this->response->withContentType('image/jpeg')->send(); + + $builder = new CaptchaBuilder; + $builder->build(); + $this->sessionStorage->captcha = $builder->getPhrase(); + $builder->output(); + } +} |