Skip to content
Snippets Groups Projects
Commit 6471e5de authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

fix: set username in action log

parent 3afeec5a
No related branches found
No related tags found
No related merge requests found
<?php
require_once 'user.class.php';
/**
* class to log all project actions, ie. build, deploy etc.
......@@ -41,12 +42,11 @@ class Actionlog {
die("ERROR: unable to create sqlite database " . $this->_dbfile);
}
}
$this->_sProject = $sProject;
if (isset($_SERVER) && is_array($_SERVER) && array_key_exists("PHP_AUTH_USER", $_SERVER) && $_SERVER["PHP_AUTH_USER"]
) {
$oUser=new user();
if ($oUser->getUsername()) {
$this->_sIP = $_SERVER["REMOTE_ADDR"];
$this->_sUser = $_SERVER["PHP_AUTH_USER"] . " (web)";
$this->_sUser = $oUser->getUsername() . " (web)";
} else {
$this->_sIP = 'local';
$aUser=posix_getpwuid(posix_geteuid());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment