Beispiel #1
0
$oPage->onlyForLogged();
$oPage->addPageColumns();
$userID = $oPage->getRequestValue('user_id', 'int');
if ($userID) {
    $oPage->onlyForAdmin();
}
$host = new IEHost();
$hostgroup = new IEHostgroup();
$contact = new IETimeperiod();
$command = new IECommand();
$service = new IEService();
$serviceGroup = new IEServicegroup();
$ownership = $oPage->getRequestValue('ownership');
if ($ownership) {
    $host->switchOwners($userID, $ownership);
    $hostgroup->switchOwners($userID, $ownership);
    $contact->switchOwners($userID, $ownership);
    $command->switchOwners($userID, $ownership);
    $service->switchOwners($userID, $ownership);
    $serviceGroup->switchOwners($userID, $ownership);
    $oPage->addStatusMessage(_('Vlastnictví byla předána'));
}
$user = new IEUser($userID);
$oPage->addItem(new IEPageTop($user->getUserName()));
if ($oPage->getRequestValue('delete') == 'true') {
    if ($user->delete()) {
        $oPage->redirect('users.php');
        exit;
    }
}
$userInfoFrame = $oPage->columnI->addItem(new EaseTWBPanel($user->getUserLogin()));