views:

179

answers:

3

I'm overhauling a site I'd originally made using Joomla to Django, and I was wondering if I can import the user records directly from Joomla (my main concern is the user passwords as they are encrypted).

A: 

Joomla (PHP) is a CMS while Django (Python) is a web framework.

I wonder whether this is really possible. What i can conclude at this point of time is that it is not possible. However someone may have any idea about this.

Thanks :)

Sarfraz
+1  A: 

Yes, you can, but you'll have to do some work. Joomla keeps users in some specific DB table structure, so you'll have to pull them out and insert them into a users table you create in your Django application. As for encryption, if the algorithm is known, it's probably the hash value that's kept in the DB, and you can just transfer it as-is as long as you implement the same hashing algorithm in your Django application.

Remember: Django is a more general 'concept' than Joomla - it's a framework for writing web application, hence in theory you can even re-implement Joomla completely with it.

Eli Bendersky
The bit I'm having issues with is implementing the same hashing algorithm in my Django application....let me see if I can find a way to do this in the meantime.
Stephen
Joomla is open-source, so you can easily find out the algorithm it uses for hashing. Most chances are it's a standard algorithm (like SHA-1) which you can find for Python in some library without really implementing much yourself
Eli Bendersky
Joomla stores salted hashes in the database. You will want to look at the bind() function in libraries/joomla/user/user.php, as well as JUserHelper::getSalt() and JUserHelper::getCryptedPassword() in libraries/joomla/user/helper.php. The login process happens in plugins/authentication/joomla.php, which also uses JUserHelper::getCryptedPassword()
jlleblanc
+1  A: 

I think there is 3 ways to approach this problem:

1) You can read about how joomla and django make hash of passwords and make the migration with a script
2) You can make your own authentication backend
3) You can use a ETL tool

diegueus9