In the premiere episode of season two, a ghost grants Sam's inadvertent wish that she and Danny had never met; in consequence, Danny loses not only memories, but his ghost powers as well, as Sam had primarily been the one to persuade Danny to investigate the Portal in the first place, which led to the accident.