Joomla Hack! Automated Joomla user registration via JSF form

Well this post is some what continuation of my last post.
What is the use of single sign on if you have to register in two different sites ? yeah this is the solution for that… What i wanted to do is, when a user registers in my java web application i wanted to register the same user in the PHP app. Since these two applications have different user data-tables (well in my project i cannot merge these tables or use one database. if that is your case just ignore this post.)

When a new user registers in my JAVA web app am taking that user form data and insert those to the joomla database. 🙂 (Yup I know.. What is there to blog about this ?)
But what went wrong is joomla use some extra data from 2 other different tables other than jos_users (in joomla database).

those tables are jos_core_acl_aro and jos_core_acl_groups_aro_map so when you are inserting the data to the jos_users table.. also save the data in to the other two tables as well.
there are foreign key constrains over these tables. so

1- Insert the user to the jos_users
2– take the user id from a select query and insert that user to the jos_core_acl_aro
3- takes jos_core_acl_aro id from a select query and insert it in to the jos_core_acl_groups_aro_map

take a look at the three tables then you will realize what you should do.

The other task is password encryption. well Joomla 1.5 uses md5 encryption mechanism to hash the passwords. When a password is created, it is hashed with a 32 character salt that is appended to the end of the password string. The password is stored as {TOTAL HASH}:{ORIGINAL SALT}.

you can see this method at plugins/authentication/joomla.php lines 80-116.

So what you have to do is take your password and make a {TOTAL HASH}:{ORIGINAL SALT} from it and save the created string. I found this information also in a discussion forum. which had shown a java class to do this task.. so yeah it was quite useful..

so that’s all about behind the seen registration 🙂

Have fun !

Advertisements

5 thoughts on “Joomla Hack! Automated Joomla user registration via JSF form”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s