Just realised we're already using $author. This should be changed to $user.