<?php
require __DIR__ . '/includes/functions.php';
customer_require_login();
if (!verify_csrf_token((string) (isset($_GET['csrf_token']) ? $_GET['csrf_token'] : ''))) {
    header('Location: customer-dashboard.php?verify=invalid');
    exit;
}
$customer = customer_current();
$result = customer_resend_verification($customer);
start_secure_session();
if (customer_show_debug_verification_link() && !empty($result['token'])) {
    $_SESSION['last_verification_link'] = customer_verification_url($customer['id'], $result['token']);
}
header('Location: customer-dashboard.php?verify=sent');
exit;
