EgyKit
Member
I want to add a custom input filter to actionRegister() function
This is my code:
This didn't work, only work when I add the custom input filter manually to the default xenforo actionRegister() function.
Any help is appreciated.
This is my code:
PHP:
protected function _getRegisterFormResponse(array $fields, array $errors = array())
{
$response = parent::_getRegisterFormResponse($fields, $errors);
$response->params += array('data' => $fields);
return $response;
}
public function actionRegister()
{
$response = parent::actionRegister();
$data = $this->_input->filter(array(
'emailconfirm_key' => XenForo_Input::STRING,
));
$response->params['fields'] += $data;
$response->params['data'] += $data;
return $response;
}
This didn't work, only work when I add the custom input filter manually to the default xenforo actionRegister() function.
Any help is appreciated.