summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_config.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-09-11 21:13:40 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-09-11 21:13:40 -0400
commitae5983a86eae4b8eed0e75b52fa35f948b111b97 (patch)
treee7f071d83f02e534e4eaae1a1328095ddbb10d25 /pts-core/functions/pts-functions_config.php
parent6d6c9e1da89ce56b0691a0e71e1d27d5e2f6bc8f (diff)
downloadphoronix-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.php15
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