function uc_user_checkemail($email) { global $_G; if (!isemail($email)) { return -4; } elseif (!check_emailaccess($email)) { return -5; } elseif (check_emailexists($email)) { return -6; } else { return 1; } }
} //如果输入微信号,检查微信号不能重复 $weixinid = trim($_GET['weixinid']); if ($weixinid) { if (!preg_match("/^[A-Za-z][\\w|-]+\$/i", $weixinid)) { showmessage('微信号不合法'); } if ($weixinid != $user['weixinid'] && C::t('user')->fetch_by_weixinid($weixinid)) { showmessage('该微信号已经被注册'); } } //邮箱验证部分 $email = strtolower(trim($_GET['email'])); if (!isemail($email)) { showmessage('profile_email_illegal', '', array(), array('handle' => false)); } elseif (!check_emailaccess($email)) { showmessage('profile_email_domain_illegal', '', array(), array('handle' => false)); } if ($email != $user['email']) { //邮箱不能重复 if (C::t('user')->fetch_by_email($email)) { showmessage('邮箱已经被注册,请更换邮箱再试'); } } //密码验证部分 if ($_GET['password']) { if ($_G['setting']['pwlength']) { if (strlen($_GET['password']) < $_G['setting']['pwlength']) { showmessage('profile_password_tooshort', '', array('pwlength' => $_G['setting']['pwlength'])); } }