|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
1、第一步
source/admincp/admincp_setting.php 文件
查找
01.showsetting('setting_access_register_send_register_url', 'settingnew[sendregisterurl]', $setting['sendregisterurl'], 'radio');
复制代码
在这个代码下添加:
01.showsetting('setting_access_register_forge_email', 'settingnew[forgeemail]', $setting['forgeemail'], 'radio');
复制代码
2、第二步
打開
source/language/lang_admincp.php 文件
查找:
個郵箱只允許註冊一個帳戶<br/>注意:只有在<a href=”?action=setting&operation=mail”>站長 – 郵件設置</a>中完成郵件設置,確保郵件能發送成功下可以開啟該功能 ‘,
或者(看是简体还是繁体):
一个邮箱只允许注册一个帐户<br/>注意:只有在<a href=”?action=setting&operation=mail”>站长 – 邮件设置</a>中完成邮件设置,确保邮件能发送成功下可以开启该功能
在下面添加:
01.'setting_access_register_forge_email' => '取消注册邮箱必填',
02.'setting_access_register_forge_email_comment' => '开启后如果用不不填写注册邮箱,将自动生成一个邮箱地址',
复制代码
或者:
01.'setting_access_register_forge_email' => '取消註冊郵箱必填',
02.'setting_access_register_forge_email_comment' => '開啟後如果用戶不填寫註冊郵箱,將自動生成一個隨機郵箱地址',
复制代码
3、第三步:
修改
01.source/class/class_member.php 文件
02.$email = strtolower(trim($_GET['email']));
03.if(empty($this->setting['ignorepassword'])) {
04.if($_GET['password'] !== $_GET['password2']) {
05.showmessage('profile_passwd_notmatch');
06.}
07.
08.if(!$_GET['password'] || $_GET['password'] != addslashes($_GET['password'])) {
09.showmessage('profile_passwd_illegal');
10.}
11.$password = $_GET['password'];
12.} else {
13.$password = md5(random(10));
14.}
15.}
复制代码
修改为:
01.$email = strtolower(trim($_GET['email']));
02.if(empty($email) && $_G['setting']['forgeemail']) {
03.$_GET['email'] = $email = strtolower(random(6)).'@'.$_SERVER['HTTP_HOST'];
04.}
05.if(empty($this->setting['ignorepassword'])) {
06.if($_GET['password'] !== $_GET['password2']) {
07.showmessage('profile_passwd_notmatch');
08.}
09.
10.if(!$_GET['password'] || $_GET['password'] != addslashes($_GET['password'])) {
11.showmessage('profile_passwd_illegal');
12.}
13.$password = $_GET['password'];
14.} else {
15.$password = md5(random(10));
16.}
17.}
|
|