Add object.IsAppUser()

This commit is contained in:
Yang Luo
2024-04-24 01:10:38 +08:00
parent 90d502ab2b
commit af2d26daf2
7 changed files with 15 additions and 8 deletions

View File

@ -120,7 +120,7 @@ func (c *ApiController) SendEmail() {
// "You have requested a verification code at Casdoor. Here is your code: %s, please enter in 5 minutes."
content = strings.Replace(content, "%s", code, 1)
userString := "Hi"
if !strings.HasPrefix(userId, "app/") {
if !object.IsAppUser(userId) {
var user *object.User
user, err = object.GetUser(userId)
if err != nil {