Don't forget to set the localpart

This commit is contained in:
Andrew Morgan 2018-06-06 11:07:25 +01:00
parent cd607d7b3b
commit 27611e7ad9

View file

@ -124,11 +124,11 @@ func (s *accountsStatements) selectPasswordHash(
func (s *accountsStatements) selectAccountByLocalpart(
ctx context.Context, localpart string,
) (*authtypes.Account, error) {
var localpartPtr, appserviceIDPtr sql.NullString
var appserviceIDPtr sql.NullString
var acc authtypes.Account
stmt := s.selectAccountByLocalpartStmt
err := stmt.QueryRowContext(ctx, localpart).Scan(&localpartPtr, &appserviceIDPtr)
err := stmt.QueryRowContext(ctx, localpart).Scan(&acc.Localpart, &appserviceIDPtr)
if err != nil {
switch err {
case sql.ErrNoRows: