Fecshop的账户注册,默认是可以登陆和使用的,目前添加了邮件激活功能
使用说明
1.注册用户填写email提交,系统发送账户注册激活邮件
2.用户注册完毕,暂时处于无法登陆状态,用户需要在邮箱中打开邮件,点击激活链接进行激活

3.点击激活链接,帐号被激活,然后用户可以登陆
代码更新:
Appfront:
https://github.com/fecshop/yii2_fecshop/commit/2958ce68fd60a0e9c34d9f1b62721225f4df3ca6
https://github.com/fecshop/yii2_fecshop/commit/69af417b4c4f39853a7f7c67e78243432a5d6fd5
配置:
@fecshop/config/services/Email.php
/**
* 注册账户是否需要邮件激活
*/
'registerAccountIsNeedEnableByEmail' => false,
/**
* 注册账户激活邮件的token的过期时间,只有当 registerAccountIsNeedEnableByEmail 为true的时候有效。
*/
'registerAccountEnableTokenExpire' = 86400,
配置完的样子为:
return [
'email' => [
'childService' => [
'customer' => [
'registerAccountIsNeedEnableByEmail' => true,
'registerAccountEnableTokenExpire' => 86400,
],
],
'mailerConfig' => [
// 默认通用配置
'default' => [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp.qq.com', //SMTP Host
'username' => '2420577683@qq.com', //SMTP 账号
'password' => 'dshagrytvnwjeabb', //SMTP 密码
'port' => '587', //SMTP 端口
'encryption' => 'tls',
],
'messageConfig'=> [
'charset'=> 'UTF-8',
],
],
],
],
];