He first met James T. Kirk at the Shipyard Bar in Riverside, Iowa in 2255. Being a Starfleet cadet, Hendorff tried to protect Nyota Uhura whom Kirk was trying to pick up. The following dispute ended in a barfight and Kirk facing three cadets as his opponents. The dispute was broken up by Captain Christopher Pike.
Security officer aboard the USS EnterpriseEdit
Three years later, Hendorff served as security officer aboard the Enterprise and was part of the security team which was sent down to engineering to arrest the intruders, namely James T. Kirk and Montgomery Scott, who had beamed aboard. He arrested the two and brought them onto the bridge where he witnessed the discussion and fight between Spock and Kirk. (Star Trek)
Background information Edit
Hendorff was played by actor Jason Matthew Smith. He is credited as "Burly Cadet #1" in Star Trek (matching the fact that, in the film's script, he was referred to as "a burly Starfleet cadet" ) and as "Cupcake" in the end credits of Star Trek Into Darkness, although he is addressed by Kirk as "Mr. Hendorff" in the latter film. When making the first film, Smith kept "begging" J.J. Abrams to give the character the name, but all of his suggestions kept being shot down. Years later, when Smith saw he had been credited as "Cupcake" in Into Darkness, Smith felt Abrams was "just messing" with him. 
In the script of Star Trek, Hendorff wasn't just called "Cup Cake" by Kirk but also "Moon Beam". 
Hendorff was meant to die in Into Darkness; Smith shot a scene where he is skewered by a Klingon's bat'leth, and was surprised to see it was cut from the film, or that it did not appear on any of the home releases. He joked, "It's got to be a Guinness Book of World Records for a redshirt to survive three movies. I never thought in a million years that I would have the kind of part that I would have. I know why they did it though. The peripheral characters make it feel like it is a real crew. The familiarity with the Enterprise and the crew are what draw you into that world. You start to care about everyone on board." 
Issue #8 of Star Trek: Ongoing from IDW Publishing, "Vulcan's Vengeance, Part 2" first revealed that "Cupcake" was the alternate reality counterpart of Hendorff. Despite Hendorff's repeated reminders to Kirk of his name, Kirk continued to call him "Cupcake." He is the narrator of issue #13, "The Redshirt's Tale", which established his first name initials as "G. P." His parents owned a Labrador dog. He also recalls that his father thought he shouldn't let Uhura get away from him.
In the novelization of Star Trek Into Darkness, Hendorff is killed by a Klingon wielding a bat'leth. Despite not being seen for the rest of the film, his appearance in Star Trek Beyond confirms his survival.