public function insertNewUser(\UserDTO $userDTO) { try { $newUser = array(":" . USERNAME => $userDTO->getUsername(), ":" . PASSWORD => $userDTO->getPassword(), ":" . JOINEDAT => NULL, ":" . PROFILEPHOTO => $userDTO->getProfilePhoto()->getPhotoId(), ":" . ROLE => $userDTO->getRole(), ":" . EMAIL => $userDTO->getEmail()); $newUserId = $this->getDB()->insert(USER_TABLE, $newUser); $userDTO->setUserId($newUserId); return $userDTO; } catch (PDOException $pdoe) { throw $pdoe; } catch (Exception $e) { throw $e; } }