打开 source/admincp/admincp_setting.php 文件
查找
- showsetting('setting_access_register_send_register_url', 'settingnew[sendregisterurl]', $setting['sendregisterurl'], 'radio');
复制代码
在这段代码下方添加
- showsetting('setting_access_register_forge_email', 'settingnew[forgeemail]', $setting['forgeemail'], 'radio');
复制代码
再打开
source/language/lang_admincp.php 文件
查找
- 个邮箱只允许注册一个帐户<br/>注意:只有在<a href="?action=setting&operation=mail">站长 - 邮件设置</a>中完成邮件设置,确保邮件能发送成功下可以开启该功能 ',
复制代码
在这段代码下方添加
- 'setting_access_register_forge_email' => '取消注册邮箱必填', 'setting_access_register_forge_email_comment' => '开启后如果用户不填写注册邮箱,将自动生成一个随机邮箱地址',
复制代码
再打开
source/class/class_member.php 文件
查找
- $email = strtolower(trim($_GET['email']));
- if(empty($this->setting['ignorepassword'])) {
- if($_GET['password'] !== $_GET['password2']) { showmessage('profile_passwd_notmatch'); }
- if(!$_GET['password'] || $_GET['password'] != addslashes($_GET['password'])) { showmessage('profile_passwd_illegal'); }
- $password = $_GET['password'];
- } else {
-
- $password = md5(random(10));
- }
- }
复制代码
替换为
- $email = strtolower(trim($_GET['email']));
- if(empty($email) && $_G['setting']['forgeemail']) {
- $_GET['email'] = $email = strtolower(random(6)).'@'.$_SERVER['HTTP_HOST']; } if(empty($this->setting['ignorepassword'])) { if($_GET['password'] !== $_GET['password2']) { showmessage('profile_passwd_notmatch');
- }
-
- if(!$_GET['password'] || $_GET['password'] != addslashes($_GET['password'])) {
-
- showmessage('profile_passwd_illegal');
- }
- $password = $_GET['password'];
- } else {
- $password = md5(random(10));
- }
- }
复制代码
|