Oh, I misread and thought he just wanted their resources after they left. I'm pretty sure everything will still work even after they leave though.
But to expand on what I originally said, you could create another Player Group for Inactive Players, and then do the same method(s) mentioned above but periodically like you had suggested.
So at the start of the game you break the Users up into two Player Groups, ActivePlayers and InactivePlayers.
If a Player leaves they're removed from ActivePlayers and put into InactivePlayers and their gold is evenly distributed among ActivePlayers.
Then you can periodically distributed the InactivePlayer's gold among the ActivePlayers. Or, make it Event based because I imagine the only time they're gaining gold is after kills, acquiring gold power ups, and being rewarded gold through triggers.