Support Services

Fast and professional to support your business
Welcome, Guest
Username: Password: Remember me

TOPIC: Login Module

Login Module 2 years 2 months ago #6987

  • Artie
  • Artie's Avatar
  • Offline
  • Junior Boarder
  • Posts: 30
  • Karma: 0
Login module works just fine if you type in the correct information, however if you make a mistake it takes you to the joomla login page instead of whmcs, which of course even if you type in the correct information will not let you login.

Any tips on hacking the login module to redirect to whmcs instead of joomla login?

Also my site started not wrapping properly after latest update. www.eurostarsoccer.com/client/cart.php
the right side menu has something overlaying it.
Last Edit: 2 years 2 months ago by Artie.
The administrator has disabled public write access.

Login Module 2 years 2 months ago #6989

  • Steven
  • Steven's Avatar
  • Offline
  • Administrator
  • Posts: 883
  • Thank you received: 60
  • Karma: 13
Is this the standard Joomla login module that you are referring to? If so, you could try hacking the /modules/mod_login/helper.php file - the first method in it specifies the return url to use, so you could use your own there.
Stars on the Joomla! Extension Directory are always appreciated
If you found this response useful, don't forget to hit Thank You!
The administrator has disabled public write access.

Login Module 2 years 2 months ago #6993

  • Artie
  • Artie's Avatar
  • Offline
  • Junior Boarder
  • Posts: 30
  • Karma: 0
Hi Steven,
I tried, but couldn't do it. There is a way to redirect on successful login, I need it to redirect to WHMCS on a non successful login. (could you please take a look at the code). Also do you know what is causing the right side not wrapping properly. It was working perfectly then something changed. you can see what mean here www.eurostarsoccer.com/client/cart.php

<?php
/**
* @package Joomla.Site
* @subpackage mod_login
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

// no direct access
defined('_JEXEC') or die;

class modLoginHelper
{
static function getReturnURL($params, $type)
{
$app = JFactory::getApplication();
$router = $app->getRouter();
$url = null;
if ($itemid = $params->get($type))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);

$query->select($db->quoteName('link'));
$query->from($db->quoteName('#__menu'));
$query->where($db->quoteName('published') . '=1');
$query->where($db->quoteName('id') . '=' . $db->quote($itemid));

$db->setQuery($query);
if ($link = $db->loadResult()) {
if ($router->getMode() == JROUTER_MODE_SEF) {
$url = 'index.php?Itemid='.$itemid;
}
else {
$url = $link.'&Itemid='.$itemid;
}
}
}
if (!$url)
{
// stay on the same page
$uri = clone JFactory::getURI();
$vars = $router->parse($uri);
unset($vars);
if ($router->getMode() == JROUTER_MODE_SEF)
{
if (isset($vars))
{
$itemid = $vars;
$menu = $app->getMenu();
$item = $menu->getItem($itemid);
unset($vars);
if (isset($item) && $vars == $item->query) {
$url = 'index.php?Itemid='.$itemid;
}
else {
$url = 'index.php?'.JURI::buildQuery($vars).'&Itemid='.$itemid;
}
}
else
{
$url = 'index.php?'.JURI::buildQuery($vars);
}
}
else
{
$url = 'index.php?'.JURI::buildQuery($vars);
}
}

return base64_encode($url);
}

static function getType()
{
$user = JFactory::getUser();
return (!$user->get('guest')) ? 'logout' : 'login';
}
}
Last Edit: 2 years 2 months ago by Artie.
The administrator has disabled public write access.

Login Module 2 years 2 months ago #6994

  • Steven
  • Steven's Avatar
  • Offline
  • Administrator
  • Posts: 883
  • Thank you received: 60
  • Karma: 13
Hi Artie,

I understand what you are looking for. Unfortunately Joomla tries to handle those failed logins itself, but you can download a plugin called Redirect Failed Login and try using that to handle failures. Else you would need to try to custom code a plugin for the on failed user login event. J!WHMCS doesn't currently handle that event.

Concerning the visual issue you linked to, you may want to remove those modules from appearing on the menu item that J!WHMCS is pulling from your Joomla site. That or disable the menu from appearing in WHMCS. To do this, log into WHMCS > Addons > JWHMCS > Settings > Visual Integration and disable the Navigation menu. From that same location you can see which menu item is retrieved from Joomla and go into Joomla and disable modules from appearing on that right sidebar.
Stars on the Joomla! Extension Directory are always appreciated
If you found this response useful, don't forget to hit Thank You!
The administrator has disabled public write access.

Login Module 2 years 2 months ago #6995

  • Artie
  • Artie's Avatar
  • Offline
  • Junior Boarder
  • Posts: 30
  • Karma: 0
hi Steven,

I was able to fix the wrap problem given your feedback so thank you. I think I will give up on this joomla login module, it is not secure and it is just giving me a headache. Any ideas on how to keep it in its current position/look but when people cilck on that just to forward them to
/client/login.php instead of opening up a module.
Last Edit: 2 years 2 months ago by Artie.
The administrator has disabled public write access.
Time to create page: 0.038 seconds
Powered by Kunena Forum