public User IsUsernameValid(string username) { User user = null; if ((user = _patientService.GetUserByUsername(username)) != null) { return(user); } else if ((user = _secretaryService.GetUserByUsername(username)) != null) { return(user); } else if ((user = _directorService.GetUserByUsername(username)) != null) { return(user); } else if ((user = _doctorService.GetUserByUsername(username)) != null) { return(user); } return(user); }