An instance of ShellCommandEventArgs passed to FileServer's ShellCommand event features a User property that identifies the user who raised the command:
server.ShellCommand += (sender, e) =>
{
if (e.Command == "whoami")
{
e.WriteLine(e.User.Name);
}
};