Expand description
User queries. Validates email format on create + on lookup (inputs are normalised to trimmed-lowercase before the DB sees them).
Functions§
- count
- create
- Create a new user with an argon2-hashed password. Email is
normalised (trimmed + lowercased) so
Alice@Example.comandalice@example.comcan’t register separately. - find_
by_ email - find_
by_ id - set_
active - set_
password - Replace a user’s password hash and invalidate every live session for that user in the same transaction.