MCPcopy
hub / github.com/daptin/daptin / GetUserMailAccountRowByEmail

Method GetUserMailAccountRowByEmail

server/resource/mail_functions.go:184–196  ·  view source on GitHub ↗

Returns the user account row of a user by looking up on email

(username string, transaction *sqlx.Tx)

Source from the content-addressed store, hash-verified

182
183// Returns the user account row of a user by looking up on email
184func (dbResource *DbResource) GetUserMailAccountRowByEmail(username string, transaction *sqlx.Tx) (map[string]interface{}, error) {
185
186 mailAccount, _, err := dbResource.Cruds["mail_account"].GetRowsByWhereClause("mail_account",
187 nil, transaction, goqu.Ex{"username": username})
188
189 if len(mailAccount) > 0 {
190
191 return mailAccount[0], err
192 }
193
194 return nil, errors.New("no such mail account")
195
196}
197
198// Returns the user mail account box row of a user
199func (dbResource *DbResource) GetMailAccountBox(mailAccountId int64, mailBoxName string, transaction *sqlx.Tx) (map[string]interface{}, error) {

Callers 4

VerifyLOGINMethod · 0.80
DaptinSmtpDbResourceFunction · 0.80
LoginMethod · 0.80

Calls 1

GetRowsByWhereClauseMethod · 0.80

Tested by

no test coverage detected