Shia LaBeouf got crazy way before going to Studio 54 Thursday night. He was caught with his pants down last month outside a restaurant in L.A. -- which is why he's now banned for life.
Shia hit up The Local Peasant in Sherman Oaks ... during his 4 hour visit, LaBeouf meandered to the back of the restaurant ... and the manager got suspicious.
Eyewitnesses tell us the manager followed Shia to the parking lot, where he saw the actor peeing on the wall, so he called LaBeouf out. Shia profusely apologized in an odd rant.
LaBeouf wasn't done ... he went back inside and tried ordering food, but the manager had enough and told Shia to get out. The 2 had words, Shia paid his tab and stormed out vowing never to return.
The restaurant tells us the feeling is mutual. Shia is officially persona non grata.