Make function to get user connection.