Esempio n. 1
0
func Update(user *user.User) error {
	user.Updated = time.Now().Unix()
	_, err := st["update"].Exec(user.Username, user.Email, user.Updated, user.Id)
	return err
}
Esempio n. 2
0
func Create(user *user.User, salt string, password string) error {
	user.Created = time.Now().Unix()
	user.Updated = time.Now().Unix()
	_, err := st["create"].Exec(user.Id, user.Username, user.Email, salt, password, user.Created, user.Updated)
	return err
}