Refactord userAvailableDirective