From ff2e2a168d88f1c0094958d618248e652cc601cb Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Mon, 1 Jun 2020 17:20:46 +0200 Subject: [PATCH] State that CreateAccount will return err ErrUserExists if the user exists Signed-off-by: Till Faelligen --- clientapi/auth/storage/accounts/postgres/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientapi/auth/storage/accounts/postgres/storage.go b/clientapi/auth/storage/accounts/postgres/storage.go index d7a753fb6..4be5dca94 100644 --- a/clientapi/auth/storage/accounts/postgres/storage.go +++ b/clientapi/auth/storage/accounts/postgres/storage.go @@ -138,7 +138,7 @@ func (d *Database) CreateGuestAccount(ctx context.Context) (acc *authtypes.Accou // CreateAccount makes a new account with the given login name and password, and creates an empty profile // for this account. If no password is supplied, the account will be a passwordless account. If the -// account already exists, it will return nil, nil. +// account already exists, it will return nil, ErrUserExists. func (d *Database) CreateAccount( ctx context.Context, localpart, plaintextPassword, appserviceID string, ) (acc *authtypes.Account, err error) {