Problem with Remember me in CB login

16 years 6 months ago #44355 by p999
I’m having a problem with CB login. It’s not remembering the user details. I have to type user name and password every time.

It works, provided I keep the same browser open, but if I close the browser, and start afresh, the login info is lost.

This occurs on both my live site, and on the test site I run on my PC (localhost)

I’ve done a search on these forums – previous posts indicates this is not a CB problem. However, I can make things work, by disabling CB login, and publishing the standard Joomla login. That points to a problem within CB login.

Any help is appreciated.

Joomla 1.5.0 RC1
Community Builder 1.1.0

Please Log in to join the conversation.

16 years 6 months ago #44415 by beat
Replied by beat on topic Re:Problem with Remember me in CB login
Please check 1.5 svn or 1.5 nightly build, and if still actual, report issue very quickly (like today) to Joomla 1.5 Q&T Forum, as Joomla 1.5 RC2 is on its way (see joomla blog) and we would not like to have this issue in Joomla 1.5 RC2.

Link to 1.5 nightly and svn instructions:

dev.joomla.org/content/view/17/60/

Link to 1.5 Q&T Forum:

forum.joomla.org/index.php/board,199.0.html

See you there (if needed ;) )

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 6 months ago #44944 by p999
Replied by p999 on topic Re:Problem with Remember me in CB login
All is not going well. I have upgraded my test site to Joomla 1.5 RC2, and mod_cblogin appears to be plain broke. Again, if I unplublish the CB login, and publish mod_login everything works as it should.

Here’s the error:
Type username and password, click [remember me] and then click [Login]. I get a 404, page could not found error. The URL it’s looking at is
[code:1]http://localhost/index.php?option=com_content&view=frontpage&Itemid=1[/code:1]The error detail reports “Article #0 not found”

I have installed the Joomla files twice, and performed the sql import. It’s running on my PC, so there are no directory permission problems to worry about.

If I subsequently go to http://localhost, I’m logged in, and everything is fine. However, the remember me still doesn’t work – if I quit the browser, and launch it again, I’m logged out.

[Edit]
I can see the problem with the URL. It differs from the home link by these extra characters "amp;".
Here's the URL that works: http://localhost/index.php?option=com_content&view=frontpage&Itemid=1

Post edited by: p999, at: 2007/09/05 15:27

Post edited by: p999, at: 2007/09/05 15:28

Please Log in to join the conversation.

16 years 6 months ago #44955 by beat
Replied by beat on topic Re:Problem with Remember me in CB login
Yes, a known problem of Joomla 1.5 RC2.

We are working at a workaround in CB login module and sent info to Joomla before 1.5 RC2 was published....

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 6 months ago #44962 by p999
Replied by p999 on topic Re:Problem with Remember me in CB login
Thanks for the quick reply. Out of interest, will the workaround address the problem I am having with “remember me”?

I’ve played around some more, and I think I see the root of the problem; CB login doesn’t generate a cookie.

I’ve worked through any potential problems on my PC, and it does appear to be able to accept cookies from my site. The most telling sign is this: Unpublish mod_cblogin, and publish mod_login instead, a cookie is generated on login, and everything works as it should.

I tried swapping the modules whilst logged in, closing the browser, and launching again. That worked. CB login restored the user. It appears the problem is confined to generating the cookie, not reading it.

It was not without error: The homepage loaded and displayed CB login with blank fields (as if not logged in), BUT with one of my special access menus shown. I clicked “home” and the page returned with CB login showing the user logged in.

[Let me just clarify the steps: with mod_login published, login as administrator, and go to the administrative back-end, unpublish mod_login, publish mod_cblogin, close browser, and launch again]

Any suggestions?

Please Log in to join the conversation.

16 years 6 months ago #44966 by beat
Replied by beat on topic Re:Problem with Remember me in CB login
Cookies generation is a Joomla issue, and the new API is not backwards compatible.

In Joomla 1.0, the $mainframe->login() does it, based on the remember post value. This is now in the API in Joomla 1.5... :S

To make that one work, you need to change this in CB in comprofiler.php, in function login:

[code:1]<?php
if ( $hashedPwdLogin ) { // Joomla 1.0.12 and below:
$mainframe->login( $username, cbHashPassword( $passwd2 ) );
} elseif ( checkJversion() == 1 ) { // Joomla 1.5 RC and above:
$mainframe->login( array( 'username' => $username, 'password' => $passwd2 ), array() );
} else {
$mainframe->login( $username, $passwd2 );
}
[/code:1]

to:

[code:1]
<?php
if ( $hashedPwdLogin ) { // Joomla 1.0.12 and below:
$mainframe->login( $username, cbHashPassword( $passwd2 ) );
} elseif ( checkJversion() == 1 ) { // Joomla 1.5 RC and above:
$mainframe->login( array( 'username' => $username, 'password' => $passwd2 ), array( 'remember' => cbGetParam( $_POST, 'remember' ) ) ); // THIS LINE CHANGED !
} else {
$mainframe->login( $username, $passwd2 );
}
[/code:1]

This is now fixed for next CB release.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.273 seconds

Facebook Twitter LinkedIn