So looking at the code you may have to to a little bit extra because the command expects it to be $1
not like piped in.
Create some shell script (and make sure it’s executable) like this
#!/bin/sh
echo $1 | tr '[:upper:]' '[:lower:]'
and then configure to use it user_map_cmd: "/opt/ood/lowercase_username"
.