Skip to content

Commit

Permalink
Simplify param check
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hunziker authored Mar 6, 2017
1 parent 12951a7 commit 746b1a7
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions administrator/components/com_users/views/users/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,7 @@


// Create shortcut to parameters.
$params = $this->state->get('params');

$app = JFactory::getApplication();
$input = $app->input;

// This checks if the config options have ever been saved. If they haven't they will fall back to the original settings.
$params = json_decode($params);
$debugoptions = isset($params->debugUsers);

if (!$debugoptions)
{
$params->debugUsers = '1';
}

$debugUsers = $this->state->get('params')->get('debugUsers', 1);
?>
<form action="<?php echo JRoute::_('index.php?option=com_users&view=users'); ?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
Expand Down Expand Up @@ -130,7 +117,7 @@
<?php if ($item->requireReset == '1') : ?>
<span class="label label-warning"><?php echo JText::_('COM_USERS_PASSWORD_RESET_REQUIRED'); ?></span>
<?php endif; ?>
<?php if ($params->debugUsers == '1'): ?>
<?php if ($debugUsers) : ?>
<div class="small"><a href="<?php echo JRoute::_('index.php?option=com_users&view=debuguser&user_id=' . (int) $item->id); ?>">
<?php echo JText::_('COM_USERS_DEBUG_USER'); ?></a></div>
<?php endif; ?>
Expand Down

0 comments on commit 746b1a7

Please sign in to comment.