go-bouquins/bouquins/dbusers.go

12 lines
299 B
Go
Raw Permalink Normal View History

2017-09-09 15:12:37 +00:00
package bouquins
// Account returns user account from authentifier
func Account(authentifier string) (*UserAccount, error) {
account := new(UserAccount)
err := stmtAccount.QueryRow(authentifier).Scan(&account.ID, &account.DisplayName)
if err != nil {
return nil, err
}
return account, nil
}