Added logic so it retrieves userId via getUser method if it isn't already available