Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve migrated a from joomla 2.5.28 and it seems still working but the I noticed that the users I tested was created before joomla 2.5.18 password update, so it is probably not working correctly for all users on my migrated site.

    For anyonw interested, open joomla2wp_mig_auth.php file and update auth_joomla() function with this one:

    function auth_joomla( $username, $password, $joomlapass ) {
    
            // Joomla 2.5.17 and before
    	$parts	= explode( ':', $joomlapass );
    	$joomlahash	= $parts[0];
    	$joomlasalt	= $parts[1];
    
    	$passwhash = ($joomlasalt) ? md5($password.$joomlasalt) : md5($password);
    
       	if ( $joomlahash == $passwhash ) {
          			return true;
       	}
    
       	// Joomla 2.5.18 and later use PHPass, the same that WP but differntly. Joomla uses PasswordHash( 10, true );, WP uses PasswordHash( 8, true );
       	require_once ( ABSPATH . 'wp-includes/class-phpass.php');
       	$phpass = new PasswordHash( 10, true );
       	if ( $phpass->CheckPassword($password, $joomlapass) ) {
       		return true;
       	}
    
          	return false;
    
    }

    It may need more testing but it seems to work with both hashing methods, before joomla 2.5.18 and after.

    Thank you so much cybmeta, that works for me!

    Yeah, that should be added to the plugin, but it seems dead.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Does not work with Joomla 2.5.18’ is closed to new replies.