note 113033 added to function.get-current-user
| From: | Anonymous | Date: | Wed, 21 Aug 2013 05:05:49 +0000 |
| Subject: | note 113033 added to function.get-current-user | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196034@lists.php.net to get a copy of this message | ||
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'));
?>
----
Server IP: 69.147.83.199
Probable Submitter: 199.126.192.221
----
Manual Page -- http://php.net/manual/en/function.get-current-user.php
Edit -- https://master.php.net/note/edit/113033
Del: integrated -- https://master.php.net/note/delete/113033/integrated
Del: useless -- https://master.php.net/note/delete/113033/useless
Del: bad code -- https://master.php.net/note/delete/113033/bad+code
Del: spam -- https://master.php.net/note/delete/113033/spam
Del: non-english -- https://master.php.net/note/delete/113033/non-english
Del: in docs -- https://master.php.net/note/delete/113033/in+docs
Del: other reasons-- https://master.php.net/note/delete/113033
Reject -- https://master.php.net/note/reject/113033
Search -- https://master.php.net/manage/user-notes.php