log.Critical("Unable to rollback directory change during failed username change from: %s to: %s. DB Error: %v. Filesystem Error: %v",oldUserName,newUserName,err,err2)
returnfmt.Errorf("failed to rollback directory change during failed username change from: %s to: %s. DB Error: %w. Filesystem Error: %v",oldUserName,newUserName,err,err2)
}
returnerr
}
returnnil
}
// checkDupEmail checks whether there are the same email with the user