changed userAvailability() function to call from Availability.php