public static function get_user_version_acceptance($userid, $versionid, $acceptances = null) {
        if (empty($acceptances)) {
            $acceptances = static::get_user_acceptances($userid, $versionid);
        }
        if (array_key_exists($versionid, $acceptances)) {
            // The policy version has ever been accepted.
            return $acceptances[$versionid];
        }

        return null;
    }
public static function get_user_version_acceptance($userid, $versionid, $acceptances = null) {
        if (empty($acceptances)) {
            $acceptances = static::get_user_acceptances($userid, $versionid);
        }
        if (array_key_exists($versionid, $acceptances)) {
            // The policy version has ever been accepted.
            return $acceptances[$versionid];
        }

        return null;
    }
public static function get_user_version_acceptance ( $ userid , $ versionid , $ acceptances = null ) { if ( empty ( $ acceptances ) ) { $ acceptances = static :: get_user_acceptances ( $ userid , $ versionid ) ; } if ( array_key_exists ( $ versionid , $ acceptances ) ) { // The policy version has ever been accepted. return $ acceptances [ $ versionid ] ; } return null ; }
Returns version acceptance for this user.

@param int $userid User identifier.
@param int $versionid Policy version identifier.
@param array|null $acceptances List of policy version acceptances indexed by versionid.
@return stdClass|null Acceptance object if the user has ever accepted this version or null if not.
Returns version acceptance for this user .