Subsonic: user management endpoints (getUser, getUsers, createUser, updateUser, deleteUser, changePassword) with full permission model mapping
This commit is contained in:
@@ -280,3 +280,9 @@ func nullStringVal(s sql.NullString) any {
|
||||
func parseTime(s string) (time.Time, error) {
|
||||
return time.Parse("2006-01-02T15:04:05.999999999Z", s)
|
||||
}
|
||||
|
||||
// SetUserEmail updates a user's email address.
|
||||
func SetUserEmail(db *sql.DB, userID, email string) error {
|
||||
_, err := db.Exec(`UPDATE users SET email = ? WHERE id = ?`, email, userID)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user