mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
elofgren: BUGFIX: Fix Email_BlackList::isBlocked() to check the Email_BlackList.BlockedEmail? field instead of non-existant Email field so that it will actaully return true when an email is blocked.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42025 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f4f6eb0333
commit
4622ce38fc
@ -917,7 +917,7 @@ class Email_BlackList extends DataObject{
|
||||
* sent has specifically been blocked.
|
||||
*/
|
||||
static function isBlocked($email){
|
||||
$blockedEmails = DataObject::get("Email_BlackList")->toDropDownMap("ID","Email");
|
||||
$blockedEmails = DataObject::get("Email_BlackList")->toDropDownMap("ID","BlockedEmail");
|
||||
if($blockedEmails){
|
||||
if(in_array($email,$blockedEmails)){
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user