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

Disable Joomla Login disables the complete dropdown also when you are logged in #6169 #6204

Merged
merged 1 commit into from Feb 18, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+48 −5
Diff settings

Always

Just for now

Disable Joomla Login disables the complete dropdown also when you are

logged in #6169
  • Loading branch information...
florian florian
florian authored and florian committed Feb 17, 2019
commit 9a03a4d4201db56a0a38d05a42c286635df6c223
@@ -58,11 +58,6 @@ public function onKunenaGetAccessControl()
*/
public function onKunenaGetLogin()
{
if (!$this->params->get('login', 1))
{
return;
}
require_once __DIR__ . "/login.php";
return new KunenaLoginJoomla($this->params);
@@ -185,4 +185,15 @@ public function getRemindURL()
return Route::_('index.php?option=com_users&view=remind' . ($Itemid ? "&Itemid={$Itemid}" : ''));
}
/**
* Return the parameters of the plugin
*
* @return JRegistry
* @since Kunena 5.1
*/
public function getParams()
{
return $this->params;
}
}
@@ -98,6 +98,12 @@ class ComponentKunenaControllerWidgetLoginDisplay extends KunenaControllerDispla
*/
public $profile_edit_url;
/**
* @var
* @since Kunena 5.1
*/
public $plglogin;
/**
* Prepare login display.
*
@@ -112,6 +118,9 @@ protected function before()
$login = KunenaLogin::getInstance();
$params = new JRegistry($login->getParams());
$this->plglogin = $params->get('login','1');
if (!$login->enabled())
{
return false;
@@ -12,6 +12,7 @@
$config = KunenaFactory::getTemplate()->params;
?>

<?php if ($this->plglogin): ?>
<div class="visible-desktop">
<?php if ($config->get('displayDropdownMenu')) : ?>
<?php echo $this->setLayout('desktop'); ?>
@@ -22,3 +23,4 @@
<?php echo $this->setLayout('mobile'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
@@ -173,6 +173,7 @@ class="btn btn-link">
</a>
</div>
<?php endif ?>
<?php if ($this->plglogin): ?>
<div class="divider"></div>

<?php echo $this->subLayout('Widget/Module')->set('position', 'kunena_logout'); ?>
@@ -189,6 +190,7 @@ class="btn btn-link">
<input type="hidden" name="task" value="logout"/>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->subLayout('Widget/Module')->set('position', 'kunena_logout_bottom'); ?>
</div>
@@ -10,6 +10,8 @@
**/
defined('_JEXEC') or die;
?>

<?php if ($this->plglogin): ?>
<div class="hidden-xs">
<?php
if (KunenaFactory::getTemplate()->params->get('displayDropdownMenu'))
@@ -25,3 +27,4 @@
<?php echo $this->setLayout('mobile'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
@@ -170,6 +170,7 @@ class="btn btn-link">
</a>
</div>
<?php endif ?>
<?php if ($this->plglogin): ?>
<div class="divider"></div>
<?php echo $this->subLayout('Widget/Module')->set('position', 'kunena_logout'); ?>
<form action="<?php echo KunenaRoute::_('index.php?option=com_kunena'); ?>" method="post"
@@ -184,6 +185,7 @@ class="btn btn-link">
<input type="hidden" name="task" value="logout"/>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
<?php endif ?>
<?php echo $this->subLayout('Widget/Module')->set('position', 'kunena_logout_bottom'); ?>
<?php endif ?>
</div>
Copy path View file
@@ -277,4 +277,23 @@ public function isTFAEnabled($userId = null)
return !(empty($otpConfig->method) || ($otpConfig->method == 'none'));
}
/**
* Return the parameters of the plugin
*
* @return JRegistry
* @since Kunena 5.1
*/
public function getParams()
{
foreach ($this->instances as $login)
{
if (method_exists($login, 'getParams'))
{
return $login->getParams();
}
}
return false;
}
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.