<commit_before><?php

namespace Odiseo\LanBundle\Controller\Frontend;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Odiseo\LanBundle\Entity\User;
use Symfony\Component\HttpFoundation\JsonResponse;

class MainController extends Controller 
{	
	public function indexAction(Request $request) 
	{
		return $this->render('OdiseoLanBundle:Frontend/Main:index.html.twig');
	}

	public function countdownAction()
	{
		return $this->render('OdiseoLanBundle:Frontend/Main:countdown.html.twig');
	}
	
	public function registerAction(Request $request) 
	{
		$register = $request->get('register');
		
		$user = $this->getUser();
		$this->setUserProperties($user, $register);
		
		$validator = $this->get('validator');
		$errors = $validator->validate($user);
		
		if (count($errors) > 0) 
		{<commit_msg>change<commit_after><?php

namespace Odiseo\LanBundle\Controller\Frontend;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Odiseo\LanBundle\Entity\User;
use Symfony\Component\HttpFoundation\JsonResponse;

class MainController extends Controller 
{	
	public function indexAction(Request $request) 
	{
		return $this->render('OdiseoLanBundle:Frontend/Main:index.html.twig');
	}

	public function countdownAction()
	{
		return $this->render('OdiseoLanBundle:Frontend/Main:countdown.html.twig');
	}
	
	public function renderContentAction(Request $request) {
	
		$user = $this->getUser();
		if ($user == null) 
		{
			return $this->render('OdiseoLanBundle:Frontend/Main:participate.html.twig');
		} else
		{
			$userRecord = $this->retrieveUserFromDb($user->getTwitterId());
			if ($userRecord->getDni() == null)
			{
				return $this->render ( 'OdiseoLanBundle:Frontend/Main:registerForm.html.twig',
						array ( 'fullName' => $userRecord->getFullName(),
								'dni' =>  $userRecord->getDni(),
								'edad' => $userRecord->getEdad(),
								'telefono' => $userRecord->getTelefono(),
								'nacionalidad' =>$userRecord->getNacionalidad(),
								'email' => $userRecord->getMail() ) );
			}
			else 
			{
				return $this->render ( 'OdiseoLanBundle:Frontend/Main:registerForm.html.twig');
			}
		}
	}
	
	public function registerAction(Request $request) 
	{
		$register = $request->get('register');
		
		$user = $this->getUser();
		$this->setUserProperties($user, $register);
		
		$validator = $this->get('validator');
		$errors = $validator->validate($user);
		
		if (count($errors) > 0) 
		{
{'fraction_non_alphanumeric': 0.1541832669322709, 'fraction_numerical': 0.0007968127490039841, 'mean_word_length': 4.6938775510204085, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, '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': '135545', 'n_tokens_mistral': 945, 'n_tokens_neox': 813, 'n_words': 123}