Home arrow Forum CB login problems - quick'n'dirty hack to solve
  Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 06:53:28 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  CB login problems - quick'n'dirty hack to solve
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: CB login problems - quick'n'dirty hack to solve  (Read 1620 times)
Lycofron
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 7


View Profile
CB login problems - quick'n'dirty hack to solve
« on: June 01, 2007, 08:37:17 AM »

Hi,

I was facing problems with CB login, even with SMF CB plugin published. Tracing the code, I found out that, for some unknown reason (could be CB architecture?) users imported from SMF were could not login (wrong password).

So, I decided to try a quick'n'dirty hack to CB code, as follows:

In comprofiler.php, around line 1307:

Code:
} else {
      $resultError = "cb login"._LOGIN_INCORRECT;
}

I changed it into this:

Code:
} else {
        $jsmf =& new jsmfFrontend();
        if(!$jsmf->doLogin(TRUE))
        $resultError = "cb login"._LOGIN_INCORRECT;
}

What this piece of code does, is, if a joomla login fails, it tries to login via JSMF (which, in turn, will update password in Joomla!).

In my test environment, it works.

Well, this is a hack solution. Another possible solution I thought of (in order not to change CB code) would be to create a function in SMF CB plugin code which would perform _isValidUser function and would update Joomla! password accordingly.

Anyway, do you think that this is a "safe" hack?

Thank you.
Logged

* Joomla 1.0.11
* CB 1.0.1
* SMF 1.1 RC 3
* J-SMF 2.0 RC 1
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use







Joomla Hacks German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
About Advertise Register Login