fix(notification): missing display name (#4653)
parent
a691131288
commit
a771cc6c2b
|
@ -18,6 +18,7 @@ func identityRetrieverFromSession(ctx *middlewares.AutheliaCtx) (*session.Identi
|
|||
|
||||
return &session.Identity{
|
||||
Username: userSession.Username,
|
||||
DisplayName: userSession.DisplayName,
|
||||
Email: userSession.Emails[0],
|
||||
}, nil
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ func identityRetrieverFromStorage(ctx *middlewares.AutheliaCtx) (*session.Identi
|
|||
|
||||
return &session.Identity{
|
||||
Username: requestBody.Username,
|
||||
Email: details.Emails[0],
|
||||
DisplayName: details.DisplayName,
|
||||
Email: details.Emails[0],
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,9 @@ func NewSMTPNotifier(config *schema.SMTPNotifierConfiguration, certPool *x509.Ce
|
|||
at := strings.LastIndex(config.Sender.Address, "@")
|
||||
|
||||
if at >= 0 {
|
||||
domain = config.Sender.Address[at:]
|
||||
domain = config.Sender.Address[at+1:]
|
||||
} else {
|
||||
domain = "localhost.localdomain"
|
||||
}
|
||||
|
||||
return &SMTPNotifier{
|
||||
|
|
|
@ -603,8 +603,8 @@ func RandomInt(n int) (int, error) {
|
|||
|
||||
max := big.NewInt(int64(n))
|
||||
|
||||
if max.IsUint64() {
|
||||
return 0, fmt.Errorf("generated max is uint64")
|
||||
if !max.IsUint64() {
|
||||
return 0, fmt.Errorf("generated max is negative")
|
||||
}
|
||||
|
||||
value, err := rand.Int(rand.Reader, max)
|
||||
|
|
Loading…
Reference in New Issue