photoprism/internal/query/account.go
Michael Mayer f5a8c5a45d Auth: Session and ACL enhancements #98 #1746
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-28 09:01:17 +02:00

12 lines
266 B
Go

package query
import (
"github.com/photoprism/photoprism/internal/entity"
)
// AccountByID finds an account by primary key.
func AccountByID(id uint) (result entity.Account, err error) {
err = Db().Where("id = ?", id).First(&result).Error
return result, err
}