getuid()
| From: | Martin Schmitz | Date: | Fri, 19 Aug 2005 14:16:42 +0000 |
| Subject: | getuid() | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-29036@lists.php.net to get a copy of this message | ||
Sorry, I don't have an acount, so I write this to webmaster.
The function getuid() returns always the scriptowner. This is bad, if
you start the script under a different username (i.e. root). There is a
way to display the caller of the script instead of the owner. You can
parse $GLOBALS['_ENV']['HOME'] i.e.:
basename( $GLOBALS['_ENV']['HOME'])
which will return the current user instead the owner (so far the
home_dir ends with the username).
Have a nice Weekend...
Martin