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 !
Awesome..
LikeLike
Thx for the tips i was making a user push aswel but i missed the other tables 🙂 staring and searching for 1 hour gave me your site 🙂
LikeLike
This is so great, really helpfull for a customer of mine. Thanks
LikeLike
nice 😉 Im really looking forward to trying this out on my next project.
And BTW, you have 4 comments now 😉
http://shashankrlz.co.nr
My technology blog.
LikeLike
I am happy to get much useful infos in the post, writing sequence is
magnificent, I constantly look for quality message, thanks for sharing. I always use http://www.hackerninja.com/ for malware detection. Can you review it?
LikeLike