Gilderoy Lockhart

"My dear boy, do use your common sense! My books wouldn't have sold half as well if people didn't think I'd done those things... Now you mention it. I'm rather gifted with Memory Charms. Otherwise, all those wizards would have gone blabbing. I'd never have sold another book. In fact, I'm going to have to do the same to you."

- Gilderoy revealing his true colors Gilderoy Lockhart is a temporary Defense Against the Dark Arts teacher at Hogwarts and serves as the hidden quaternary antagonist of Harry Potter and the Chamber of Secrets.

He is potrayed by Kenneth Branagh, who also portrays Viktor Cherevin and Dr. Arliss Loveless and also plays Dr. Frankenstein in the film version of the novel.

Lockhart is a handsome and extremely self-absorbed and narcissistic wizard who has built a reputation for himself as a heroic wizard celebrity. In reality, he is not only a completely incompetent teacher, but a fraud who has used his only real talent - memory charms - to erase other wizards and witches memories and take credit for their accomplishments.

After Ginny Weasley is taken into the Chamber of Secrets, Lockhart immediately plans to leave Hogwarts instead of rescuing her, revealing himself to be a coward. When Harry and Ron force him to help them find her, he attempts to erase their memories in order to save his reputation. Unfortunately for him, he uses Ron's malfunctioning wand and accidentally erases his own memory. He was later seen in the book version of Harry Potter and the Order of the Phoenix in St. Mungo's for Magical Maladies and Injuries in the Permanent Resident Ward where he has recovered to the point of being able to write letters though he no longer knows why. While Ron feels guilty about putting Lockhart in this situation, Harry isn't since he knows Lockhart was at fault for erasing his own memories when he was trying to erase theirs. According to J.K. Rowling, he never fully recovered from this mishap.

Trivia

 * In a post-credits bonus scene, it is revealed that Lockhart wrote another book after losing his memories, titled Who Am I? He's seen wearing a straight jacket on the cover.
 * Originally, in the earlier drafts of Harry Potter and the Order of the Phoenix film, Lockhart would be reappear like in the book, portrayed again by Kenneth Branagh, but finally, he was deleted from the movie.