Untested but
follow
these steps in order:
- TRUNCATE TABLE TABLE_PREFIXgaz_subscriptions;
- INSERT INTO TABLE_PREFIXgaz_subscriptions (userid, emailformat, newsletter1) SELECT userid, 1, 1 FROM TABLE_PREFIXuser WHERE options & 16;
- INSERT INTO TABLE_PREFIXgaz_subscriptions (userid, emailformat, newsletter1) SELECT userid, 1, 0 FROM TABLE_PREFIXuser WHERE NOT options & 16;
This should add everyone to the gaz_subscriptions table and subscribe those to newsletter
1 that are set to receive admin emails. You will need to look at the fields in the gaz_subscriptions table to determine what you should use in place of newsletter
1 in the above queries, and do queries two and three for each newsletter field. You should also temporarily turn off new registrations while doing this so no one slips through while you are running these queries.