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 10effb3 commit 76e8eecCopy full SHA for 76e8eec
models/user.go
@@ -1346,6 +1346,19 @@ func GetUserByEmail(email string) (*User, error) {
1346
return GetUserByID(emailAddress.UID)
1347
}
1348
1349
+ // Finally, if email address is the protected email address:
1350
+ if strings.HasSuffix(email, fmt.Sprintf("@%s", setting.Service.NoReplyAddress)) {
1351
+ username := strings.TrimSuffix(email, fmt.Sprintf("@%s", setting.Service.NoReplyAddress))
1352
+ user := &User{LowerName: username}
1353
+ has, err := x.Get(user)
1354
+ if err != nil {
1355
+ return nil, err
1356
+ }
1357
+ if has {
1358
+ return user, nil
1359
1360
1361
+
1362
return nil, ErrUserNotExist{0, email, 0}
1363
1364
0 commit comments