Zubair

Hi

Is there any way to restrict email notifications for a new message, friend requests etc.  I don't want my site members to receive too many emails. 

Thanks

Be the first person to like this.
Karol Orzeł

Fo single user - yes. Not for all new users. Defaults are all enabled.

Be the first person to like this.
Kirk

Oh, I see. Wouldn't it be easier to just instruct members on how to select the notices they want to receive and to disable the ones they don't?

Be the first person to like this.
JohnJr

Wrong info

Last update on June 18, 2018 by JohnJr.
JohnJr

Wrong Info

Last update on June 18, 2018 by JohnJr.
Be the first person to like this.
JohnJr

Wrong Info

Last update on June 18, 2018 by JohnJr.
Be the first person to like this.
JohnJr

Wrong Info

Last update on June 18, 2018 by JohnJr.
Be the first person to like this.
JohnJr

Wrong Info

Last update on June 18, 2018 by JohnJr.
Be the first person to like this.
Karol Orzeł

Yup. Tested that. That changes basically NOTHING. I will tell you how it works. That "default" is just setting in your profile (that little switch in privacy). What is worse that does not affect the notifications at all. To make it happen you still have to go to the privacy settings and you have to hit SAVE. Then proper database entry is made and notifications are disabled. Crazy huh ? yeah. Problem is that by default code is written that way that if no database changes are made - then always notifications are sent. So no matter what is set in "default" php class code, no databse changes are made. In short - phpfox php code is not prepared for change in default behavior. It's set to sent notifications when NO databse changes are made. So setting the defaults to 0 does not change that because that does not affects database at all. 

Be the first person to like this.
JohnJr

I am so sorry...I guess I should never assume with phpfox.  This was done by our previous owners. It did seem odd when I was looking at it but it was 2am so I never tested it after seeing the levers changed.

Be the first person to like this.
JohnJr

Duplicate post

Last update on June 18, 2018 by JohnJr.
Be the first person to like this.
Zubair

Thanks, Johnjr and Karol for your suggestions. I think I should try to edit entries in DB table to see if it works.

Be the first person to like this.
JohnJr

If I remember correctly I seen about 8 new enties in the user privacy table when I switched the levers over and saved.

Last update on June 18, 2018 by JohnJr.
Be the first person to like this.
JohnJr

Ok...maybe I can get it right this time.  It looks like when the notification for email notifications are change the following is added to the user_notification table with the user_id:

  • comment.add_new_comment
  • comment.approve_new_comment
  • forum.subscribe_new_post
  • friend.new_friend_accepted
  • friend.new_friend_request
  • like.new_like
  • mail.new_message

 

If the above records are not there for the user than like Karol said...they get the emails and he is totally right on everything else as well.  What we need to do is find the exact spot in the code where the user is added to the database and in that spot just add  the 7 records to the database through a insert

$this->database()->insert(Phpfox::getT('user_notification')

 

Last update on June 18, 2018 by JohnJr.
Liviu

Any updates on this?

Be the first person to like this.
JohnJr

Sorry, I gave both of them a starting point but they never responded back :(

Be the first person to like this.