forked from elabftw/elabftw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathucp.php
46 lines (39 loc) · 1.04 KB
/
ucp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* ucp.php
*
* @author Nicolas CARPi <[email protected]>
* @copyright 2012 Nicolas CARPi
* @see https://www.elabftw.net Official website
* @license AGPL-3.0
* @package elabftw
*/
namespace Elabftw\Elabftw;
use Exception;
use Symfony\Component\HttpFoundation\Response;
/**
* User Control Panel
*
*/
require_once 'app/init.inc.php';
$App->pageTitle = _('User Control Panel');
try {
$TeamGroups = new TeamGroups($App->Users);
$teamGroupsArr = $TeamGroups->readAll();
$Templates = new Templates($App->Users);
$templatesArr = $Templates->readFromUserid();
$template = 'ucp.html';
$renderArr = array(
'langsArr' => Tools::getLangsArr(),
'teamGroupsArr' => $teamGroupsArr,
'templatesArr' => $templatesArr
);
} catch (Exception $e) {
$template = 'error.html';
$renderArr = array('error' => $e->getMessage());
} finally {
$Response = new Response();
$Response->prepare($Request);
$Response->setContent($App->render($template, $renderArr));
$Response->send();
}