Use `setquota`.
In the simple form the command is
setquota _user blockquota blocklimit inodequota inodelimit filesystem_
E.g.
setquota foo 10G 10G 0 0 /data
to set both the soft quota and hard limit to 10 GB and no inode limit for user `foo` on `/data`.
I suppose you could use `quota -u $username` to get the current quotas, but I'm not sure how easy that is to parse with a script.