Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
입력금지 메일 도메인 체크코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chicpro committed Dec 18, 2014
1 parent 2c3ab56 commit d5f1e26
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/register.lib.php
Expand Up @@ -112,12 +112,16 @@ function valid_mb_email($reg_mb_email)
function prohibit_mb_email($reg_mb_email)
{
global $config;

list($id, $domain) = explode("@", $reg_mb_email);
$email_domains = explode("\n", trim($config['cf_prohibit_email']));
for ($i=0; $i<count($email_domains); $i++) {
if (strtolower(settype($domain, "string")) == strtolower(settype($email_domains[$i], "string")))
return "$domain 메일은 사용할 수 없습니다.";
}
$email_domains = array_map('trim', $email_domains);
$email_domains = array_map('strtolower', $email_domains);
$email_domain = strtolower($domain);

if (in_array($email_domain, $email_domains))
return "$domain 메일은 사용할 수 없습니다.";

return "";
}

Expand Down

0 comments on commit d5f1e26

Please sign in to comment.