# yatra/3.0.3/app/Core/Handlers/EmailVerificationPageHandler.php

Yatra – Travel Booking &amp; Tour Operator Software, version 3.0.3. 39 lines.

- Page: https://pluginprobe.com/plugins/yatra/3.0.3/code/app/Core/Handlers/EmailVerificationPageHandler.php
- Raw: https://pluginprobe.com/plugins/yatra/3.0.3/raw/app/Core/Handlers/EmailVerificationPageHandler.php
- Modified: 2026-05-04T10:23:44+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/yatra/3.0.3/code/app/Core/Handlers/EmailVerificationPageHandler.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Yatra\Core\Handlers;

use Yatra\Controllers\AuthController;

/**
 * Pretty / plain routes for customer email verification links.
 */
final class EmailVerificationPageHandler extends BasePageHandler
{
    /**
     * @param array<string, mixed> $route_data
     */
    public function handle(array $route_data): bool
    {
        $token = isset($route_data['token']) ? (string) $route_data['token'] : '';
        $token = preg_replace('/[^a-zA-Z0-9_-]/', '', $token) ?? '';

        if ($token === '') {
            $this->prevent404();
            AuthController::handleEmailVerification();

            return true;
        }

        $this->prevent404();
        $this->setQueryVars([
            'yatra_verify_email' => $token,
        ]);

        AuthController::handleEmailVerification();

        return true;
    }
}

```
