This commit is contained in:
Magnus Åhall 2024-11-29 09:15:42 +01:00
parent bd4a475923
commit 9a164b984a
36 changed files with 2500 additions and 77 deletions

View file

@ -189,7 +189,7 @@ func (mngr *Manager) Authenticate(username, password string) (authenticated bool
} // }}}
func (mngr *Manager) CreateUser(username, password, name string) (alreadyExists bool, err error) { // {{{
_, err = mngr.db.Exec(`
INSERT INTO public.user(username, password, name, totp)
INSERT INTO public.user(username, password, name)
VALUES(
$1,
public.password_hash(
@ -199,8 +199,7 @@ func (mngr *Manager) CreateUser(username, password, name string) (alreadyExists
/* password */
$2::bytea
),
$3,
''
$3
)
`,
username,