You can use the `id` command:
$ id
uid=1000(muru) gid=1000(muru) groups=1000(muru),4(adm),24(cdrom),27(sudo)...
Just the UID:
$ id -u
1000
Just the GID:
$ id -g
1000
So, using command substitution:
$ sudo mount -t cifs -o "username=${USER},password=${PASSWORD},uid=$(id -u),gid=$(id -g)" \
//server-address/folder /mount/path/on/ubuntu