I will not write the entire thing out for you, but will give you kind of pseudocode
On your first line after #!/bin/sh
VARIABLE=`ps -aux | grep $1`
where $1 is the user's id you supply at the command line
Next, the process ids are available in the second column of the output, and so a simple
cut -f 2
will yeild the proper process ids.
All that you now have to do is to run kill -HUP
for all these process ids.