<?php
class KK_avatarOnRegistration_ControllerPublic_register extends XFCP_KK_avatarOnRegistration_ControllerPublic_register
{
public function applyAvatar()
{
$userid = $this->_
//Grab image from user
$avatar = $this->_input->filterSingle('avatar_date', XenForo_Input::UINT);
//create instance of XenForo's User's DataWriter
$dw = XenForo_DataWriter::create('XenForo_DataWriter_User');
//Set the field with the data we filtered
$dw->set('avatar_date', $avatar);
//Lets save into the database
$dw->save();
//Lets send a response to the user, so he knows everything is A OK
return $this->responseRedirect(
XenForo_ControllerResponse_Redirect::SUCCESS,
$this->getDynamicRedirect()
);
}
/**
* Grab XenForo Avatar Model
* @return getMdelFromCache
*/
protected function _getAvatarModel()
{
return $this->getModelFromCache ('XenForo_Model_Avatar');
}
}