News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to clear users topic/board email notifications?

Started by MobileCS, February 18, 2015, 04:00:38 PM

Previous topic - Next topic

MobileCS

Could someone tell me where to go in the database so I can clear some of my users topic/board email notifications?

I have some users that haven't logged in in over a year but my the forum is still sending them notifications.

Thank you.

Shambles

Why not, as Admin, amend their profile to remove those notifications?

Oldiesmann

As Shambles said, you can unsubscribe them from their profile.
Michael Eshom
Christian Metal Fans

MobileCS

I may not have been completely honest about how many users we're talking about here.

It'll be too much work to do this on a 'per user' basis. Is this possible to do via the database?


Kindred

Almost anything is POSSIBLE... assuming you know how to code it.
However, in this case, I belueve it is moderately to extremely COMPLICATED to do what you are asking
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MobileCS

I'm assuming the same goes for SMF 2.x?

How difficult is something like this to code? Would it be a waste of time to post it in the 'Help Wanted' [Paid] section?

margarett

It shouldn't be *that* difficult, methinks...

If you go to phpmyadmin, SQL tab, and write this:
DELETE FROM smf_log_notify
WHERE id_member = 1

You will remove all notifications from user with ID 1

If you can have a list of IDs that should have notifications removed, it should be possible to automate this.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

MobileCS

Ok, so if I wanted to delete all notifications for users that haven't logged in since Jan 1, 2014 - would something like this work?

DELETE FROM smf_log_notify
JOIN smf_members AS m
WHERE smf_log_notify.ID_MEMBER = m.ID_MEMBER AND m.lastLogin < 1388577600

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

MobileCS

For future reference and anyone else wishing to do this, the correct SQL statement is :

DELETE FROM smf_log_notify
USING smf_log_notify, smf_members
WHERE smf_log_notify.ID_MEMBER = smf_members.ID_MEMBER
AND smf_members.lastLogin < 1420070400; (timestamp for Thu, 01 Jan 2015 00:00:00 GMT)

Advertisement: