userrepo

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeEmail

func ChangeEmail(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, newMail string) error

ChangeEmail changes the user's email address

func ChangePreferredMailType

func ChangePreferredMailType(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, preferHTML bool) error

ChangePreferredMailType changes the user's preferred email mimetype

func SetEmail

func SetEmail(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID, mail string, mailVerified bool) error

SetEmail sets a user's email address

Types

type MailInfo

type MailInfo struct {
	Mail           db.NullString `db:"email"`
	MailVerified   bool          `db:"email_verified"`
	PreferHTMLMail bool          `db:"prefer_html_mail"`
}

MailInfo holds information about a user's mail settings

func GetAndCheckMail

func GetAndCheckMail(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID) (
	data MailInfo, errRes *model.Response,
	err error,
)

GetAndCheckMail gets the MailInfo for a mytoken and already checks that it can be used

func GetMail

func GetMail(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID) (data MailInfo, err error)

GetMail returns the mail address and verification status for a user linked to a mytoken

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL