public static function can_comment_user($userid) {
        global $USER;

        $capabilities = array('moodle/competency:usercompetencycomment');
        if ($USER->id == $userid) {
            $capabilities[] = 'moodle/competency:usercompetencycommentown';
        }

        if (has_any_capability($capabilities, context_user::instance($userid))) {
            return true;
        }

        return false;
    }