return;
}
- if (count($a->user) && x($a->user, 'uid') && $a->user['uid'] != local_user()) {
+ if (count($a->user) && !empty($a->user['uid']) && $a->user['uid'] != local_user()) {
notice(L10n::t('Permission denied.') . EOL);
return;
}
if ($a->argc > 2 && $a->argv[1] === 'add' && intval($a->argv[2])) {
// delegated admins can view but not change delegation permissions
- if (x($_SESSION, 'submanage')) {
+ if (!empty($_SESSION['submanage'])) {
$a->internalRedirect('delegate');
}
if ($a->argc > 2 && $a->argv[1] === 'remove' && intval($a->argv[2])) {
// delegated admins can view but not change delegation permissions
- if (x($_SESSION, 'submanage')) {
+ if (!empty($_SESSION['submanage'])) {
$a->internalRedirect('delegate');
}
if (!is_null($parent_user)) {
$parent_password = ['parent_password', L10n::t('Parent Password:'), '', L10n::t('Please enter the password of the parent account to legitimize your request.')];
+ } else {
+ $parent_password = '';
}
$o = Renderer::replaceMacros(Renderer::getMarkupTemplate('delegate.tpl'), [