We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dadc03f commit bd55f6fCopy full SHA for bd55f6f
models/user.go
@@ -1334,6 +1334,19 @@ func GetUserByEmail(email string) (*User, error) {
1334
return GetUserByID(emailAddress.UID)
1335
}
1336
1337
+ // Finally, if email address is the protected email address:
1338
+ if strings.HasSuffix(email, fmt.Sprintf("@%s", setting.Service.NoReplyAddress)) {
1339
+ username := strings.TrimSuffix(email, fmt.Sprintf("@%s", setting.Service.NoReplyAddress))
1340
+ user := &User{LowerName: username}
1341
+ has, err := x.Get(user)
1342
+ if err != nil {
1343
+ return nil, err
1344
+ }
1345
+ if has {
1346
+ return user, nil
1347
1348
1349
+
1350
return nil, ErrUserNotExist{0, email, 0}
1351
1352
0 commit comments