Lack of interest Userfield Validator

  • Thread starter Thread starter ragtek
  • Start date Start date
This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.
R

ragtek

Guest
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
 
Upvote 2
This suggestion has been closed. Votes are no longer accepted.
Top Bottom