/**
  * Returns all of the specified User's hashed passwords.  If the User's list of passwords is NULL,
  * and create is set to TRUE, an empty password list will be associated with the specified User
  * and then returned. If the User's password map is NULL and create is set to FALSE, an exception
  * will be thrown.
  *
  * @param User $user The user whose old hashes should be returned
  * @param bool $create TRUE - if no password list is associated with this user, create one
  *                     FALSE - if no password list is associated with this user, do not create one
  *
  * @return A list containing all of the specified User's password hashes
  */
 public function getAllHashedPasswords($user, $create)
 {
     //        TODO: Reverify with tests. Something doesn't seem right here
     $hashes = $this->passwordMap[$user];
     if ($this->isValidString($hashes)) {
         return $hashes;
     }
     if ($create) {
         $hashes = array();
         $this->passwordMap[$user] = $hashes;
         return hashes;
     }
     throw new RuntimeException("No hashes found for " . $user->getAccountName() . ". Is User.hashcode() and equals() implemented correctly?");
 }