mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-22 00:06:53 +01:00
* [MOD] Print timestamp when logging to file
* [MOD] Display user name and login when listing API tokens
This commit is contained in:
@@ -67,11 +67,11 @@ $timeStart = Init::microtime_float();
|
||||
* Función para enviar mensajes al log de errores
|
||||
*
|
||||
* @param mixed $data
|
||||
* @param bool $printLastCaller
|
||||
* @param bool $printLastCaller
|
||||
*/
|
||||
function debugLog($data, $printLastCaller = false)
|
||||
{
|
||||
if (!error_log(print_r($data, true) . PHP_EOL, 3, LOG_FILE)) {
|
||||
if (!error_log(date('Y-m-d H:i:s') . ' - ' . print_r($data, true) . PHP_EOL, 3, LOG_FILE)) {
|
||||
error_log(print_r($data, true));
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ function debugLog($data, $printLastCaller = false)
|
||||
* Alias gettext function
|
||||
*
|
||||
* @param string $string
|
||||
* @param bool $tranlate Si es necesario traducir
|
||||
* @param bool $tranlate Si es necesario traducir
|
||||
* @return string
|
||||
*/
|
||||
function __($string, $tranlate = true)
|
||||
|
||||
@@ -43,13 +43,14 @@ class ApiTokenSearch extends ApiTokenBase implements ItemSearchInterface
|
||||
*/
|
||||
public function getMgmtSearch(ItemSearchData $SearchData)
|
||||
{
|
||||
$query = 'SELECT authtoken_id,' .
|
||||
'authtoken_userId,' .
|
||||
'authtoken_actionId, ' .
|
||||
'authtoken_token, ' .
|
||||
'user_login ' .
|
||||
'FROM authTokens ' .
|
||||
'LEFT JOIN usrData ON user_id = authtoken_userId ';
|
||||
$query = /** @lang SQL */
|
||||
'SELECT authtoken_id,
|
||||
authtoken_userId,
|
||||
authtoken_actionId,
|
||||
authtoken_token,
|
||||
CONCAT(user_name, \' (\', user_login, \')\') AS user_login
|
||||
FROM authTokens
|
||||
LEFT JOIN usrData ON user_id = authtoken_userId ';
|
||||
|
||||
$Data = new QueryData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user