MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / GetUserByID

Method GetUserByID

internal/identity/store.go:3091–3100  ·  view source on GitHub ↗
(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

3089}
3090
3091func (s *Store) GetUserByID(ctx context.Context, id string) (*User, error) {
3092 u := &User{}
3093 err := s.pool.QueryRow(ctx,
3094 `SELECT id, email, name, google_subject, created_at FROM users WHERE id = $1`, id,
3095 ).Scan(&u.ID, &u.Email, &u.Name, &u.GoogleSubject, &u.CreatedAt)
3096 if err != nil {
3097 return nil, err
3098 }
3099 return u, nil
3100}
3101
3102// UpdateUserName persists a new display name on the user row and
3103// returns the updated User. Input validation (length, whitespace) is

Implementers 1

Storeinternal/identity/store.go

Calls 2

ScanMethod · 0.80
QueryRowMethod · 0.80