Retrieve User info from Order

Hi guys,
I was trying to do a “past orders” tabs in the user page, but I noticed that I can’t get the user id when a customer do an order.
How can i retrieve this information?