diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-28 11:31:54 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-28 11:31:54 -0400 |
commit | ab48a09f0d674b703467975b376c5ac7352670ae (patch) | |
tree | 99fbb0cf719acee8c500622d498bd7f6375b62a1 /app/Controller/CaptchaController.php | |
parent | 82b5b491bec94cb3d40a5820fbef9959435309be (diff) |
Rename controllers
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(); + } +} |