<commit_before><?php

namespace Cac\UserBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Cac\UserBundle\Entity\Bigboss;
use Cac\UserBundle\Form\RegistrationBigbossFormType;

/**
 * Barman controller.
 *
 * @Route("/user")
 */
class BasicUserController extends Controller
{
    /**
     * Register new user entities.
     *
     * @Route("/register", name="user_register")
     * @Template()
     */
    public function registerAction()
    {
        return $this->container
                    ->get('pugx_multi_user.registration_manager')
                    ->register('Cac\UserBundle\Entity\BasicUser');
    }

    /**
     * Register new user entities.
     *
     * @Route("/sconfirm/{email}&{token}", name="user_sconfirm")
     * @Template()
     */
    public function sconfirmAction($email, $token)
    {
        var_dump(urldecode($email));
        var_dump($token);
        var_dump(
            'http://'.$_SERVER['HTTP_HOST'].$this->generateUrl('user_sconfirm', array(
                'email' => urlencode('<EMAIL>'),
                'token' => '<PASSWORD>'
                ))
            );
        die;
    }
}<commit_msg>User validation by mail OK<commit_after><?php

namespace Cac\UserBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Cac\UserBundle\Entity\Bigboss;
use Cac\UserBundle\Form\RegistrationBigbossFormType;

/**
 * Barman controller.
 *
 * @Route("/user")
 */
class BasicUserController extends Controller
{
    /**
     * Register new user entities.
     *
     * @Route("/register", name="user_register")
     * @Template()
     */
    public function registerAction()
    {
        return $this->container
                    ->get('pugx_multi_user.registration_manager')
                    ->register('Cac\UserBundle\Entity\BasicUser');
    }

    /**
     * Register new user entities.
     *
     * @Route("/sconfirm/{email}&{token}", name="user_sconfirm")
     * @Template()
     */
    public function sconfirmAction($email, $token)
    {
        $em = $this->getDoctrine()->getManager();
        $user = $em->getRepository('Cac\UserBundle\Entity\BasicUser')->findOneByCustomValidationToken($token);
        $user->setIsActive(true);
        $em->persist($user);
        $em->flush();

        var_dump($user->getIsActive());
        die;

        return array();
    }
}
{'fraction_non_alphanumeric': 0.13983050847457626, 'fraction_numerical': 0.0, 'mean_word_length': 2.8808219178082193, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6536441', 'n_tokens_mistral': 819, 'n_tokens_neox': 806, 'n_words': 123}