XF 1.5 MySQL Query to Mass Unsubscribe Users From Admin Emails


Active member
Hi, I'd like to mass unsubscribe all of my users with less than X posts from receiving admin emails. The mass user edit page didn't have the admin email setting as an option I can change, so I'm needing to do this with a direct database query.

What would that query be? I'm not familiar enough with XenForo's database storage to know where this setting resides.


Jake Bunce

XenForo moderator
Staff member
Run this query on your database:

Rich (BB code):
UPDATE xf_user_option AS uo
SET uo.receive_admin_email = 0
WHERE uo.user_id IN (
	SELECT u.user_id
	FROM xf_user AS u
	WHERE u.message_count < 10