<?php
// no need to replace the google image CAPTCHA

 
 
class Tac_FaceBookRegCaptcha_ControllerPublic_Register extends XFCP_Tac_FaceBookRegCaptcha_ControllerPublic_Register
{


	public function actionFacebook()
	{
		
		$responseView = parent::actionFacebook(); 
		
		if ( array_key_exists ( 'templateName' , $responseView  ) && $responseView->templateName == 'register_facebook')
		{

		
			$params = $responseView->params;
			$params['captcha'] = XenForo_Captcha_Abstract::createDefault();
			
			return $this->responseView('XenForo_ViewPublic_Register_Facebook', 'fbrc_register_facebook', $params);	
			
		} 
	
		return $responseView;
	}

	
	
	

	
	public function actionFacebookRegister()
	{
	
		
		
	$doAssoc = ($this->_input->filterSingle('associate', XenForo_Input::STRING)
			|| $this->_input->filterSingle('force_assoc', XenForo_Input::UINT)
		);	
	
	if(!$doAssoc)
	{	
				
		$errors = array();

		if (!XenForo_Captcha_Abstract::validateDefault($this->_input))
		{
			return $this->responseError(new XenForo_Phrase('did_not_complete_the_captcha_verification_properly'));
		}	
	}	
		
	$responseView = parent::actionFacebookRegister();
	return $responseView;
		
	}
		
	
}