File size: 549 Bytes
e4f4821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?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();
        session_set('captcha', $builder->getPhrase());
        $builder->output();
    }
}