public static function is_user_version_accepted($userid, $versionid, $acceptances = null) {

        $acceptance = static::get_user_version_acceptance($userid, $versionid, $acceptances);

        if (!empty($acceptance)) {
            return (bool) $acceptance->status;
        }

        return null;
    }
public static function is_user_version_accepted($userid, $versionid, $acceptances = null) {

        $acceptance = static::get_user_version_acceptance($userid, $versionid, $acceptances);

        if (!empty($acceptance)) {
            return (bool) $acceptance->status;
        }

        return null;
    }
public static function is_user_version_accepted ( $ userid , $ versionid , $ acceptances = null ) { $ acceptance = static :: get_user_version_acceptance ( $ userid , $ versionid , $ acceptances ) ; if ( ! empty ( $ acceptance ) ) { return ( bool ) $ acceptance -> status ; } return null ; }
Did the user accept the given policy version?

@param int $userid User identifier.
@param int $versionid Policy version identifier.
@param array|null $acceptances Pre-loaded list of policy version acceptances indexed by versionid.
@return bool|null True/false if this user accepted/declined the policy; null otherwise.
Did the user accept the given policy version?