1. 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

Discussion in 'Closed Suggestions' started by ragtek, Jun 11, 2012.

  1. ragtek

    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
    case 'callback':
    $matched call_user_func_array(
    $field['match_callback_class'], $field['match_callback_method']),
    $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
    $visitor XenForo_Visitor::getInstance();
    inside of the validator and it's an edit via the acp, it would be the admins visitor instance
    Jake Hakoda Shirley and x3sphere like this.
  2. Jake Hakoda Shirley

    Jake Hakoda Shirley Active Member

    Any chance this could get picked up for the sake of convenience?

Share This Page