VPN up/down scripts username variable

When writing a script to run when a vpn (dis)connects, is there any way for the script to know the username of the user who logged in or out?

$user

Oh. That was complicated. Thanks