I believe you want getlogin. It worked for me on linux under both forms of su.
Camel 3 suggests my $login = getlogin() || getpwuid() || "Intruder!";
After Compline,
Zaxo
In reply to Re: How to get the logged in user id
by Zaxo
in thread How to get the logged in user id
by Matts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |