It depends on how the voting is allowed. If you are allowing anyone to vote, then it stores by IP address since some people that are voting won't actually have a userid. If you are allowing only registered users to vote then it stores by their actual userid.