pin new account to user

This commit is contained in:
tsmethurst 2021-10-17 14:38:19 +02:00
commit 556ac3da81

View file

@ -24,12 +24,13 @@ import (
"crypto/rsa" "crypto/rsa"
"database/sql" "database/sql"
"fmt" "fmt"
"github.com/sirupsen/logrus"
"net" "net"
"net/mail" "net/mail"
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/ap"
"github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/db"
@ -145,6 +146,7 @@ func (a *adminDB) NewSignup(ctx context.Context, username string, reason string,
u := &gtsmodel.User{ u := &gtsmodel.User{
ID: newUserID, ID: newUserID,
AccountID: acct.ID, AccountID: acct.ID,
Account: acct,
EncryptedPassword: string(pw), EncryptedPassword: string(pw),
SignUpIP: signUpIP.To4(), SignUpIP: signUpIP.To4(),
Locale: locale, Locale: locale,