Quantcast
Channel: Rebex Q&A Forum - Recent questions and answers
Viewing all articles
Browse latest Browse all 3860

Answered: Identifying User that raise custom command

$
0
0

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);
    }
};

Viewing all articles
Browse latest Browse all 3860

Trending Articles