fix
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/chinese_to_pinyin"
|
||||
"fusenapi/utils/email"
|
||||
"fusenapi/utils/ldap_lib"
|
||||
"strings"
|
||||
|
||||
@@ -46,8 +47,8 @@ func (l *CreateLdapUserLogic) CreateLdapUser(req *types.CreateLdapUserReq, useri
|
||||
if req.Password == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "密码不能为空")
|
||||
}
|
||||
if req.Email == "" {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "邮箱不能为空")
|
||||
if !email.IsEmailValid(req.Email) {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "邮箱格式不正确")
|
||||
}
|
||||
ldapServer := ldap_lib.NewLdap(l.svcCtx.Ldap, l.svcCtx.Config.Ldap.BaseDN, l.svcCtx.Config.Ldap.RootDN)
|
||||
//把用户名转pinyin
|
||||
|
||||
Reference in New Issue
Block a user