• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Userfield Validator

R

ragtek

Guest
#1
It would be nice if the instance of the datawriter would be sent to verifyUserFieldValue (it's used inside of XenForo_DataWriter_User::setCustomFields ) and also to the custom validator callback method
PHP:
case 'callback':
$matched = call_user_func_array(
array($field['match_callback_class'], $field['match_callback_method']),
array($field, &$value, &$error)
);
So we're able to see via $dw->getOption(self::OPTION_ADMIN_EDIT) if it's an edit via acp or direct from the user

Also it's impossible ATM to get the user id from the user, if it's an edit via the acp, and if the datawriter would be available, we could use $dw->get('user_id'); , right? ;)


eg: http://xenforo.com/community/threads/data-passed-to-custom-userfield-callbacks.32556/
if the code would use
PHP:
$visitor = XenForo_Visitor::getInstance();
inside of the validator and it's an edit via the acp, it would be the admins visitor instance