# fluent-support/1.10.5/app/Http/Controllers/TwofaController.php

Fluent Support – Helpdesk &amp; Customer Support Ticket System, version 1.10.5. 26 lines.

- Page: https://pluginprobe.com/plugins/fluent-support/1.10.5/code/app/Http/Controllers/TwofaController.php
- Raw: https://pluginprobe.com/plugins/fluent-support/1.10.5/raw/app/Http/Controllers/TwofaController.php
- Modified: 2024-08-15T13:05:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-support/1.10.5/code/app/Http/Controllers/TwofaController.php#L10-L20`.

```php
<?php
namespace FluentSupport\App\Http\Controllers;

use FluentSupport\Framework\Request\Request;
use FluentSupport\App\Hooks\Handlers\TwoFaHandler;



class TwofaController extends Controller
{
    public function verify2fa  ( Request $request )
    {
        $data = $request->get();
        $data['login_passcode'] = sanitize_text_field($data['login_passcode']);
        $data['login_hash'] = sanitize_text_field($data['login_hash']);

        $verify = (new TwoFaHandler)->verify2FaEmailCode($data);
        if(!$verify){
            return $this->response([
                'message' => __('Your provided code is not valid. Please try again', 'fluent-support')
            ], 423);
        }
    }

}

```
