Skip to content

Commit

Permalink
Fix bug that would throw an error when using setDefaultAdmin().
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe authored and Joe committed Sep 28, 2017
1 parent 623a12e commit a8354c9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions code/SmtpTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ public function canView($member = null) {

$emailParts = explode("@",$member->Email);

if (!in_array($emailParts[1],$userDomainWhitelist)) {
return false;
}
if (count($emailParts) == 1) {
$domain = $emailParts[0];
} else {
$domain = $emailParts[1];
}

if (!in_array($domain,$userDomainWhitelist)) {
return false;
}
}

return Permission::check("CMS_ACCESS_SmtpTester");
Expand Down

0 comments on commit a8354c9

Please sign in to comment.