mirror of
https://github.com/sigmasternchen/webcli
synced 2025-03-15 22:28:54 +00:00
we need a hostname file
This commit is contained in:
parent
a4c9c28baf
commit
e5f92df02a
1 changed files with 14 additions and 0 deletions
14
backend/init.php
Normal file
14
backend/init.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
require_once("actionLogger.php");
|
||||||
|
require_once("sessionManager.php");
|
||||||
|
require_once("userManager.php");
|
||||||
|
require_once("fileManager.php");
|
||||||
|
|
||||||
|
$result = array();
|
||||||
|
$result['uid'] = $_SESSION['uid'];
|
||||||
|
$user = userManager::getUserById($_SESSION['uid']);
|
||||||
|
$result['username'] = $user->name;
|
||||||
|
$result['home'] = fileManager::getPathById($user->homeFK);
|
||||||
|
$result['hostname'] = fileManager::getFileById(fileManager::getIdByPath("/etc/hostname"))->content;
|
||||||
|
echo json_encode($result);
|
||||||
|
?>
|
Loading…
Reference in a new issue