Optimize user csv export

Minor code optimization.

cc @eviltrout