MCPcopy
hub / github.com/usefathom/fathom / GetUserByEmail

Method GetUserByEmail

pkg/datastore/sqlstore/users.go:27–32  ·  view source on GitHub ↗

GetUserByEmail retrieves user from datastore by its email

(email string)

Source from the content-addressed store, hash-verified

25
26// GetUserByEmail retrieves user from datastore by its email
27func (db *sqlstore) GetUserByEmail(email string) (*models.User, error) {
28 u := &models.User{}
29 query := db.Rebind("SELECT * FROM users WHERE email = ? LIMIT 1")
30 err := db.Get(u, query, email)
31 return u, mapError(err)
32}
33
34// SaveUser inserts the user model in the connected database
35func (db *sqlstore) SaveUser(u *models.User) error {

Callers

nothing calls this directly

Calls 1

mapErrorFunction · 0.85

Tested by

no test coverage detected