note 113033 deleted from function.get-current-user by peehaa
| From: | peehaa@php.net | Date: | Sun, 25 Aug 2013 18:38:06 +0000 |
| Subject: | note 113033 deleted from function.get-current-user by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196073@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
----
Since this only returns the file owner and not the actual user running the script, an alternative in
Linux is:
<?php
$current_user = trim(shell_exec('whoami'));
?>