<?php

declare(strict_types=1);

namespace KupShop\TwoFactorBundle\Util;

use KupShop\UserBundle\Security\User;
use Scheb\TwoFactorBundle\Model\PersisterInterface;

class UserPersister implements PersisterInterface
{
    /**
     * @param User $user
     */
    public function persist($user): void
    {
        $user->getKupshopUser()->setCustomData('email_code', $user->getEmailAuthCode());
    }
}
