Page 1 of 1

send_email_notification

Posted: Sun Jan 24, 2016 8:59 am
by Barrowboy
Hi

With this UDT is it possible to only have a notification from just users i.e. Editors not Administrators.

Thanks

Re: send_email_notification

Posted: Tue Jan 26, 2016 5:42 pm
by Dr.CSS
Sorry but you may need to give more detail as to what you mean/want...

Re: send_email_notification

Posted: Tue Jan 26, 2016 7:32 pm
by Barrowboy
I thought it was a simple enough question. I just wanted to only send email notification when a back end editor edited a page and not when admin edited a page.

The notifications are sent to admin email so there is no need to sent one when admin makes the update.

He already knows.

Cheers,

Re: send_email_notification

Posted: Tue Jan 26, 2016 8:58 pm
by Dr.CSS
This would be an events manager function...

Re: send_email_notification

Posted: Tue Jan 26, 2016 11:55 pm
by paulbaker
Looks like you are talking about the code shown here:
http://www.cmscanbesimple.org/blog/send ... age-change

If so you could change the last line (@mail...) to something like this, assuming your admin's login name is "dave":

Code: Select all

if ($editor != "dave") {
@mail($to, $subject, $message);
}
i.e. only send the email if the change has been made by someone other than dave. I do something similar - works great for me.

Re: send_email_notification

Posted: Wed Jan 27, 2016 8:19 am
by Barrowboy
Hi Thanks for your tip.

I have done something similar by checking the username and then acting.

Thanks again.