mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: user register / send activate email
This commit is contained in:
@@ -19,3 +19,17 @@ func NewOveruseNotification(userName, reason string) (string, string) {
|
||||
return fmt.Sprintf("【%s】空间容量超额提醒", options["siteName"]),
|
||||
util.Replace(replace, options["over_used_template"])
|
||||
}
|
||||
|
||||
// NewActivationEmail 新建激活邮件
|
||||
func NewActivationEmail(userName, activateURL string) (string, string) {
|
||||
options := model.GetSettingByNames("siteName", "siteURL", "siteTitle", "mail_activation_template")
|
||||
replace := map[string]string{
|
||||
"{siteTitle}": options["siteName"],
|
||||
"{userName}": userName,
|
||||
"{activationUrl}": activateURL,
|
||||
"{siteUrl}": options["siteURL"],
|
||||
"{siteSecTitle}": options["siteTitle"],
|
||||
}
|
||||
return fmt.Sprintf("【%s】注册激活", options["siteName"]),
|
||||
util.Replace(replace, options["mail_activation_template"])
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ func SetSession(c *gin.Context, list map[string]interface{}) {
|
||||
// GetSession 获取session
|
||||
func GetSession(c *gin.Context, key string) interface{} {
|
||||
s := sessions.Default(c)
|
||||
Log().Debug("Key:%s Val:%s", key, s.Get(key))
|
||||
return s.Get(key)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user