Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
Ziggy ©
migrating from Joomla to Liferay
3 agosto 2009 14.35
Risposta

Ziggy ©

Punteggio: Expert

Messaggi: 293

Data di Iscrizione: 8 giugno 2008

Messaggi recenti

Has anyone managed to migrate users from a Joomla site to Liferay? I had a look at the Joomla's user's table and i think its a bit difficult because the password is encrypted. Does anyone know if liferay use the same hash algorithm for encrypting the password?

Here is the jos_users table on a joomla site
 1
 2mysql> describe jos_users;
 3+---------------+---------------------+------+-----+---------------------+----------------+
 4| Field         | Type                | Null | Key | Default             | Extra          |
 5+---------------+---------------------+------+-----+---------------------+----------------+
 6| id            | int(11)             | NO   | PRI | NULL                | auto_increment |
 7| name          | varchar(255)        | NO   | MUL |                     |                |
 8| username      | varchar(150)        | NO   | MUL |                     |                |
 9| email         | varchar(100)        | NO   | MUL |                     |                |
10| password      | varchar(100)        | NO   |     |                     |                |
11| usertype      | varchar(25)         | NO   | MUL |                     |                |
12| block         | tinyint(4)          | NO   |     | 0                   |                |
13| sendEmail     | tinyint(4)          | YES  |     | 0                   |                |
14| gid           | tinyint(3) unsigned | NO   | MUL | 1                   |                |
15| registerDate  | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
16| lastvisitDate | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
17| activation    | varchar(100)        | NO   |     |                     |                |
18| params        | text                | NO   |     | NULL                |                |
19+---------------+---------------------+------+-----+---------------------+----------------+
2013 rows in set (0.00 sec)


I dont know a lot about the liferay's users table. Do you think its possible or im i up for a few long nights in the next few days?? emoticon
Petros Giakouvakis
RE: migrating from Joomla to Liferay
3 agosto 2009 15.04
Risposta

Petros Giakouvakis

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 3 agosto 2009

Messaggi recenti

Hi,

Haven't done this this could work:
You might want to have a look at the following:

http://forum.joomla.org/viewtopic.php?f=432&t=207689

It provides the encryption class.

Next you could override the Liferay password encryption algorithm. If you look at portal.properties you see:

# Encryption is implemented by com.liferay.util.Encryptor.provider.class in
# system.properties.

So... in override system.properties

#
# Set the security provider class.
#
com.liferay.util.Encryptor.provider.class=com.sun.crypto.provider.SunJCE

And set your custom encryptor there...
Ziggy ©
RE: migrating from Joomla to Liferay
6 agosto 2009 14.20
Risposta

Ziggy ©

Punteggio: Expert

Messaggi: 293

Data di Iscrizione: 8 giugno 2008

Messaggi recenti

Hi thanks that was very usefull.

One of the things i am trying to do now is try and transfer the data from the joomla forum to the liferay forum. I still havent worked out the relationships in the tables for the liferay forum.

I think once i manage to migrate the data i can then use that class to modify the password?
Petros Giakouvakis
RE: migrating from Joomla to Liferay
7 agosto 2009 2.25
Risposta

Petros Giakouvakis

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 3 agosto 2009

Messaggi recenti

I think once i manage to migrate the data i can then use that class to modify the password?


What do you mean 'modify the password?'

Do you want your users to keep their passwords or is that not necessary??
Ziggy ©
RE: migrating from Joomla to Liferay
7 agosto 2009 3.53
Risposta

Ziggy ©

Punteggio: Expert

Messaggi: 293

Data di Iscrizione: 8 giugno 2008

Messaggi recenti

Yes i would like to keep the password to be the same as what it was on the Joomla site. So i need to decrypt the passowrd from the joomla site and encrypt it using the liferay encryption and save it in liferay db.
Petros Giakouvakis
RE: migrating from Joomla to Liferay
7 agosto 2009 7.03
Risposta

Petros Giakouvakis

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 3 agosto 2009

Messaggi recenti

Ah ok, that's what I first thought. Yes, I do believe that should be possible. Migrate the users and set their password in Liferay to correspond to the encrypted string in Joomla.
Next change the encryption class. that way when one of your users enters a password, that password is encrypted by the "Joomla algorithm" and the encrypted resulting string should be the same as what is stored in Liferay.

You will need to know the seed of Joomla. Probably specified during installation???
Petros Giakouvakis
RE: migrating from Joomla to Liferay
7 agosto 2009 7.07
Risposta

Petros Giakouvakis

Punteggio: Junior Member

Messaggi: 33

Data di Iscrizione: 3 agosto 2009

Messaggi recenti

I don't think your solution will be possible as you cannot decrypt the Joomla password. You can only encrypt.

So will need to store the Joomla encrypted passwords in Liferay and change the passwords.

Something that will save a lot of time?? Create random passwords for your users and let Liferay send them a mail. And let the users change their passwords upon first login. (IF that's an option)
Ziggy ©
RE: migrating from Joomla to Liferay
7 agosto 2009 9.47
Risposta

Ziggy ©

Punteggio: Expert

Messaggi: 293

Data di Iscrizione: 8 giugno 2008

Messaggi recenti

Petros Giakouvakis:

Something that will save a lot of time?? Create random passwords for your users and let Liferay send them a mail. And let the users change their passwords upon first login. (IF that's an option)


Yes i think you are right. Ill just generate some random passwords and have them change their password when they log in. I dont think its worth to spend all the time if it will only take a few minutes for the users to change their passwords.

Thanks for your help.