From: Anthony Talarico Date: Tue, 19 Dec 2017 20:44:11 +0000 (-0500) Subject: adding better checking for the ismoderated flag when sending admin notifications X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=7b5ae294c691370c12a1a2a143a6074fc6480157;p=WP-Plugins%2Fglm-member-db-for-sale.git adding better checking for the ismoderated flag when sending admin notifications adding another conditional to compare member ids with the request data before sending the notification to the admin --- diff --git a/models/admin/forSale/index.php b/models/admin/forSale/index.php index d76366c..7d5c1bf 100644 --- a/models/admin/forSale/index.php +++ b/models/admin/forSale/index.php @@ -222,7 +222,9 @@ class GlmMembersAdmin_forSale_index extends GlmDataForSale $itemAddError = true; } if($isModerated){ - $notification->sendAdminNotice($memberID, $item); + if ( isset( $_REQUEST['member'] ) && $memberID = filter_var( $_REQUEST['member'] ) ) { + $notification->sendAdminNotice($memberID, $item); + } } $view_file = 'edit';