2 login forms

15 years 6 months ago #77278 by skurvish
Replied by skurvish on topic Re:2 login forms
CB Passphrase is not going to work for us. It is hard enough to get people to use the system to begin with let alone ask for another password.

I did try the same test with both global and CB Registrations enabled and received the same results.

Please Log in to join the conversation.

15 years 5 months ago #78757 by ern1001
Replied by ern1001 on topic Re:2 login forms
Hi,

I had the same problem with the joomla login page appearing after a session timeout (so the user sees 2 logins - Joomla and Community Builder), even though I'm using the Community Builder login and the joomla login is disabled. So here is a brute force solution that works for me (running Community Builder 1.2RC3 and Joomla 1.5.7 - legacy mode):

1) Find the following folder in your joomla root:
/components/com_user/views/login/tmpl

2) In that folder, rename the default_login.php file to something like original_default_login.php - in case you want to revert back to it later.

3) Then put in a new default_login.php file with a file that has these 2 lines:
<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php mosRedirect( 'index.php' )?>

Now, when the sessions times-out it will redirect back to your home page login, without the joomla login showing up as well.

I'm sure that there must be a better solution than this, but it works.

Post edited by: ern1001, at: 2008/11/02 00:04

Please Log in to join the conversation.

15 years 5 months ago #78789 by skurvish
Replied by skurvish on topic Re:2 login forms
That did the trick. Other than no message to indicate a timeout it works perfectly.

Thank you so much.

Please Log in to join the conversation.

15 years 5 months ago #78886 by ern1001
Replied by ern1001 on topic Re:2 login forms
Hi,
I'm glad it works for you too.
If you want a timeout message, here is the code:

[code:1]<?php
/**
* This file replaces the original default_login.php at
* joomla-root/components/com_user/views/login/tmpl/default_login.php
* It keeps the joomla login page from appearing after a
* session timeout and just redirects back to the homepage instead
* Only use this if you have Community Builder, or some
* other 3rd party login enabled
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
return JError::raiseNotice( 0, JText::_( 'Your Session Has Timed-out' ) );
mosRedirect( 'index.php' )
?>[/code:1]

Post edited by: ern1001, at: 2008/11/03 20:35

Post edited by: ern1001, at: 2008/11/03 20:36

Please Log in to join the conversation.

15 years 5 months ago #79023 by skurvish
Replied by skurvish on topic Re:2 login forms
Hi,

Thanks for all the help. This code doesn't seem to work for me though. When the timeout occurs the screen goes back to the CB login but there is no message, just a blank area.

Any ideas? I don't see anything obviously wrong with the code.

Please Log in to join the conversation.

15 years 5 months ago #79024 by ern1001
Replied by ern1001 on topic Re:2 login forms
Hi,
What I found was that redirecting to index.php causes the timeout message to not always appear. Redirecting to index.php?option=com_comprofiler&amp;task=login allows the message to appear.

However, now I found a better way that I'm using on my site - that does not require core hacks.

I have modified the ADJR Disable Joomla Registration plugin so that it will also redirect the joomla login to the CB login. It also displays a message & works good on my site now.

I've forwarded the changes to the ADJR author. If you want a copy of the modified version, I can send it to you.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.220 seconds