diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-09-11 21:13:40 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-09-11 21:13:40 -0400 |
commit | ae5983a86eae4b8eed0e75b52fa35f948b111b97 (patch) | |
tree | e7f071d83f02e534e4eaae1a1328095ddbb10d25 /pts-core/functions/pts-functions_config.php | |
parent | 6d6c9e1da89ce56b0691a0e71e1d27d5e2f6bc8f (diff) | |
download | phoronix-test-suite-upstream-ae5983a86eae4b8eed0e75b52fa35f948b111b97.tar.gz phoronix-test-suite-upstream-ae5983a86eae4b8eed0e75b52fa35f948b111b97.tar.xz phoronix-test-suite-upstream-ae5983a86eae4b8eed0e75b52fa35f948b111b97.zip |
pts-core: Drop PTS_USER_DIR usage
Diffstat (limited to 'pts-core/functions/pts-functions_config.php')
-rw-r--r-- | pts-core/functions/pts-functions_config.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_config.php b/pts-core/functions/pts-functions_config.php index 6bf54f4..9f5be43 100644 --- a/pts-core/functions/pts-functions_config.php +++ b/pts-core/functions/pts-functions_config.php @@ -226,6 +226,21 @@ function pts_find_home($path) } return $path; } +function pts_user_home() +{ + // Gets the system user's home directory + if(function_exists("posix_getpwuid") && function_exists("posix_getuid")) + { + $userinfo = posix_getpwuid(posix_getuid()); + $userhome = $userinfo["dir"]; + } + else + { + $userhome = getenv("HOME"); + } + + return $userhome . "/"; +} function pts_current_user() { // Current system user |