adding better checking for the ismoderated flag when sending admin notifications
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 19 Dec 2017 20:44:11 +0000 (15:44 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 19 Dec 2017 20:44:11 +0000 (15:44 -0500)
adding another conditional to compare member ids with the request data before sending the
notification to the admin

models/admin/forSale/index.php

index d76366c..7d5c1bf 100644 (file)
@@ -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';