Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added backend users #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Classes/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use T3Monitor\T3monitoringClient\Provider\DataProviderInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\HttpUtility;
use TYPO3\CMS\Frontend\Utility\EidUtility;

/**
* Class Client
Expand Down
40 changes: 40 additions & 0 deletions Classes/Provider/BackendUserProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

namespace T3Monitor\T3monitoringClient\Provider;

/*
* This file is part of the t3monitoring_client extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*/

class BackendUserProvider implements DataProviderInterface
{
/**
* @var \TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository
*/
protected $backendUserRepository;

/**
* @var \TYPO3\CMS\Extbase\Object\ObjectManager
*/
protected $objectManager;

public function get(array $data)
{
$backendUsers = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'be_users', 'deleted=0');
foreach($backendUsers as $backendUser)
{
$backendUserData = array(
'userName' => $backendUser['username'],
'realName' => $backendUser['realName'],
'emailAddress' => $backendUser['email'],
'description' => $backendUser['description'],
'lastLogin' => $backendUser['lastlogin'],
);
$data['users']['backend'][] = $backendUserData;
}
return $data;
}
}
2 changes: 1 addition & 1 deletion Classes/Provider/StatusReportProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function initialize()
protected function getLanguageService()
{
if ($GLOBALS['LANG'] === null) {
$GLOBALS['LANG'] = GeneralUtility::makeInstance(\TYPO3\CMS\Lang\LanguageService::class);
$GLOBALS['LANG'] = GeneralUtility::makeInstance('TYPO3\\CMS\\Lang\\LanguageService');
}
return $GLOBALS['LANG'];
}
Expand Down
1 change: 1 addition & 0 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
} else {
$GLOBALS['TYPO3_CONF_VARS']['EXT']['t3monitoring_client']['provider'][] = 'T3Monitor\\T3monitoringClient\\Provider\\Extension6xProvider';
}
$GLOBALS['TYPO3_CONF_VARS']['EXT']['t3monitoring_client']['provider'][] = 'T3Monitor\\T3monitoringClient\\Provider\\BackendUserProvider';

//$GLOBALS['TYPO3_CONF_VARS']['EXT']['t3monitoring_client']['provider'][] = 'T3Monitor\\T3monitoringClient\\Provider\\DummyDataProvider';

Expand Down