Joomla MySQL Auth
Mey 3rd, 2007 at 10:37 am (Joomla)
This is an extension with a component and a module for Authenticate users right from a mysql usertable. All informations about the database (hostname, databasename etc) can be configured in admin. The Query to get the user information is also to be set in the admin backend. This was tested to authenticate phpBB users and drupal users. And should work with others as well.
Every user who logs in is registered automatically to your Joomla user table. And if they change password in the remote site, their password will be updated when they log back in joomla. (So the username and password are always synchronized)
UPDATE 1-Sept-2006
- Some of you said that the users are not shown in list as joomla users. It seems the users are in the database but since they dont’ have names they are not shown in the Administration panel.
So please use the name field in the SQL Query to make it work well
UPDATE 7-sept-2006:
Sorry that the example I put here had an error. I forgot a ‘
This is the right example.
eg. SELECT name_field_in_my_table AS name, username_field_in_my_table AS username, email_field_in_my_table AS email FROM my_table WHERE username_field_in_my_table=’%{user}’ AND password_field_in_my_table=md5(’%{pass}’)
UPDATE 20-June-2007
- This version is for Joomla 1.0.x >= 1.0.12
- Fixing some session issues in Joomla 1.0.12
- Using josSpoofCheck (that’s why it wont’ work with Joomla < 1.0.12)
Downloads
- mysql_auth.zip (this file contains the component and the module… so you need to extract it first)
- mysql_auth svn repository This is the last commit imported from joomla forge.
Mey 4, 2007 at 1:04 pm
Hello!
How do i do to get the users from Joomla to the phpbb board?
Mey 4, 2007 at 2:04 pm
Normally if you use this, you won’t have extra users in joomla. All your joomla users are from phpbb.
That means, you don’t have any registration link in joomla.
Mey 10, 2007 at 7:17 pm
I would like to see if we can reverse this the otherway, sync the joomla users to the usertable of 3party app…
Mey 10, 2007 at 10:41 pm
I didn’t get what you mean.
Now, this component syncs the joomla users to the usertable of 3rd party app.
That means, if you have a principal usertable in your 3rd party app, its users are copied in joomla.
Mey 14, 2007 at 4:14 pm
Im trying to use this extension with a fresh installation of Joomla and my 4images based gallery.
When i first set it up , It allowed me to pull the username, password, and email address for the first person i logged in as. It did register that username, however when i logged out, and tried to log back in, it does not log me in. It shows as there is a member online but it did not log me in. At that point if i try to pull another user , it does the same thing and doesnt log me in.
Here is the query I use
SELECT user_name AS name, user_name AS username, user_email AS email FROM 4images_users WHERE user_name=’%{user}’ AND user_password=MD5(’%{pass}’)
Please let me know if i am doing something wrong.
Please contact me by email if you can, thanks.
Mey 25, 2007 at 9:51 am
Hi all
I need some advice. I currently have Joomla installed and the phpbb forums. I have installed the module and set up the SQl statement correclty so thatwhen I log in to Joomla it authenticates against the phpbb_users and where needed it creates the new user in Joomla.
Great stuff
but……
When I click on the link to go to the selected forum I am asked to log in again when ideally I want to sign on only once.
Any suggestions?
Jiona 4, 2007 at 9:54 am
Hello,
I’m trying to integrate digishop shopping cart with joomla. Your module works very well. Thank you!
Now it would be quite helpful to have CB (Community Builder) installed on my joomla as well. I guess though, you module might not be working correctly, but I leave the answer to you and, maybe, you could even give me some directions, or some ideas.
Thank you again
Lorenzo
Jiona 4, 2007 at 8:30 pm
hi there, great mod!
however for some reason it only allows the first record to be inserted from my database into joomla - any ideas?
is there a how to guide at all??
Jiona 9, 2007 at 9:05 am
webbyhull> I don’t get what you mean here.
Only the user who logs in are inserted in the database.
Jiona 10, 2007 at 10:20 am
hello, thx
Jiona 18, 2007 at 9:32 am
Users keep getting logged out using the login module supplied with this component. Normal Joomla login module gives no problems. I am using the phpBB from Mendi it works perfectly appart from the logout issue
Jiona 22, 2007 at 10:27 am
Hi,
I feel I have known a great component: But Can you tell me if i may use this for the following:
I am running a website which is meant for Ham Radio Operators. The site is on Joomla + CB. As the user registers on my website i need to be able to give them email id as username@domain.com. Now, I have a mail server that can talk to external database for user names / pwd. Say that be mySQL db.
Can I use your com / mod to have the user db from joomla (CB) to sync with my external mySQL DB ?
Please reply.
Kusumba S
Jiona 22, 2007 at 2:58 pm
Kusumba> If you use the CB module login form then this will not work.
mysqlAuth needs its own login form
Jiona 26, 2007 at 2:08 pm
I get this error on installing to Joomla 1.0.12-
Fatal error: Call to undefined function com_install() in C:\wamp\www\j12\administrator\components\com_installer\component\component.class.php on line 193
Jiona 27, 2007 at 3:26 pm
The user will be imported into the jom_user table, right? Is there no way to keep my very own user table as the authentication table? Or to delete the user from jos_uder when his session expired?
Jiona 27, 2007 at 4:10 pm
Ok, to make it more clear
I need to verify always if the user is still within my personal user table, if not, the user should be deleted from jos_user and the login to the joomla system should be denied. Any idea?
Jiona 27, 2007 at 6:32 pm
k2a> that is an error in your joomla installation. I’m using it with 1.0.12
Zappu> I understand your concern. In fact, now if the user is removed from the external table, it is still active in joomla untill you remove it.
I’ll try to work on it.
Jolay 1, 2007 at 4:53 am
Hello Hery !
i want use this plugin… but i have installed the forum in other Data base.
And i have 2 db then… 1- WEB_jos (for Joomla), 2- WEB_xs (for PhpBB XS)
and i cant run this.
I have installed the component, and i have set the Access by mysql auth, but dont work for me…
i havent much knowledgemen about SQL, sorry.
PLease help me. I want a Forum in my page.
Thanks in advance, thanks for all.
Regards!!

Marcos
PD: sorry my english, im spanish.
Jolay 23, 2007 at 1:36 pm
Hey,
i would like to know if you are going to make your plugin compatible with the upcoming Joomla!1.5?
Jolay 24, 2007 at 10:36 pm
I would like to use your script for a 3rd party application, the user table uses “salt” in addition to an MD5 hash.
Jolay 24, 2007 at 10:38 pm
Also,
I am willing to pay/donate if you can help me accomplish this task.
Thanks!
Jolay 26, 2007 at 11:48 pm
Hi,
excellent mod/comp. With joomla 1.0.13 I reconized it works too but something is different as before. If a user login from my ext. DB at first time the login will ot appear but the user is created in joomla. Of course the second logi works. Any idea?
At least would it be ok for you to tell us if you’re working on a version for Joomla 1.5?
cheers
Alex
Jolay 27, 2007 at 6:53 pm
Can i place an “insert into” instead of a slect to reverse the process and have sql auth update the third party database?
Aogositra 9, 2007 at 9:23 pm
I followed the directions and it ran great with 2 mySQL databases, but breaks when the external DB is MSSQL. Do you have any plans of making this MS SQL Server compatiable? Right now I’m having to export my MSSQL data to a mySQL table to get around this incompatibility.
It would be greatly appreciated.
PS: Thanks for your great / hard work!
- SteveOH
Aogositra 14, 2007 at 10:27 am
I am using a third party script and it has the Firstname, Lastname, UID, Email in one (userdata) table and it has UID, Username, & Password in (Logins) table. How do I configure the SELECT statements since the items reside in two different tables? Please Help. I’ve been lookin for a connection in databases and this is going to be wonderful. I will be forced to donate if this works!
Aogositra 15, 2007 at 12:03 am
I am using a third party script and it has the Firstname, Lastname, UID, Email in one (userdata) table and it has UID, Username, & Password in (Logins) table. How do I configure the SELECT statements since the items reside in two different tables? Please Help. I’ve been lookin for a connection in databases and this is going to be wonderful. I will be forced to donate if this works!
Aogositra 15, 2007 at 10:16 pm
I have installed the MySQL AUTH component and log in module to use in conjunction with Mehdi’s phpbb bridge. I am using your component so that I can continue to use the phpbb user table as the default user table for the entire site. I have hacked Mehdi’s bridge so that registration continues to go through phpbb instead of Joomla.
I have a problem with the MySQL component though. All users attempt to log in twice in order to log in to the site. The first time a user tries to log in, the page simply reloads with blank user/password fields to be filled in again.
The component seems to be holding cookies once logged in, but I fear the need to log in twice will become a nuisance. Is there a fix for this?
I can send you a test user/password via e-mail if you would like.
Thanks!
shane
Aogositra 16, 2007 at 1:33 am
Brandon> you can try this. If it doesn’t work, then email me.
SELECT CONCAT(u.Lastname, ‘ ‘, u.Firstname) AS name, l.Username AS username, u.Email AS email FROM userdata u LEFT JOIN Logins l ON u.UID=l.UID WHERE l.Username=’%{user}’ AND l.Password=md5(’%{pass}’)
I followed exactly the table names that you give, and it is supposed that the password field is md5-ed.
Aogositra 16, 2007 at 1:34 am
Brandon> be careful because this blog changes the single quote character to ‘
Aogositra 16, 2007 at 1:35 am
shane> yes. that happens because joomla and phpbb don’t use the same coockie name.
Aogositra 19, 2007 at 11:58 pm
Hery,
Is there a way to write a MySQL Auth page that will open when the Joomla com_login is called? I have instances where registered members (not signed in) try to view private content and are pushed to the Joomla com_login login form instead of the MySQL AUTH login form.
BTW, the double sign-in problem seems to go away if the user will remove old cookies. Once I did that I can sign on the first time every time.
Great component!
Aogositra 21, 2007 at 10:29 am
Has anyone done any penetration testing with this component yet? It looks very interesting, but I am cautious having had several joomla sites hacked recently (through an injection weakness in the Expose component)
Aogositra 22, 2007 at 3:22 pm
Is it possible to use this component to access another joomla installation on another domain with different database?
I use CB 1.1 and Joomla 1.0.12
Septambra 22, 2007 at 7:55 am
I am wondering if it is possible to get this to basically copy users from my main site’s database to the user section of its subdomain site databases.
So that mainsite running joomla and say, 5 subdomains all running Joomla too would share user data.
I am a bit clueless with SQL and PHP so any help would be greatly appreciated, you can reach me via my email.
Cheers
Oktobra 8, 2007 at 5:54 pm
Why dont you use the CB connector to integrate Joomla 1.0.13 or Joomla 1.5 rc3 with phpBB 3.0 rc 5? working like a charm and you leave Joomla and phpbb untouched.
http://www.cbconnector.com - the latest alpha version 6 I have tried working very well
Oktobra 13, 2007 at 6:35 am
Hi everybody
I am on the site for the first time
The site has an interesting title
I’ve read many corresnondences
I want to open a new theme
It will be interesting
By by
[url=http://debt-payments-reduce.com/?affid=2290]mortgage[/url]
Oktobra 27, 2007 at 3:09 pm
This component do not function with phpBB3, because phpBB3 do not use md5. Will be updates mysql auth ? Can you help me ?
Oktobra 28, 2007 at 3:56 am
READ ABOUT online pharmacy- BUY OR DIE !!!
Hi!
In this town nowbody knew about this!!!
The graetest pharmacology companies SAY : ” BUY OR DIE!!!” Read about this at -
http://nva.name/news/
Oktobra 28, 2007 at 4:36 am
1000 ôîðóìîâ 2 äîëëàðà 5000 ôîðóìîâ 8 äîëëàðîâ 10000 ôîðóìîâ 13 äîëëàðîâ 50000 ôîðóìîâ 50 äîëëàðîâ
Áîíóñ ïðåäëîæåíèå äëÿ òåõ êòî çàêàæåò 20000 ôîðóìîâ ÷åðåç íåäåëþ ïîâòîðíàÿ îòïðàâêà
Ðåôïðåäëîæåíèå: ÷åëîâåê êîòîðûé ïðèâåäåò ìíå êëèåíòà áóäåò ïîëó÷àòü 10% îò çàêàçà êëèåíêà!!!
Îáðàùàòüñÿ â àñþ 3ïÿòü3-8øåñòü7-0íîëü1 ìûëî anhelluss(ãàâ)yandex.ru
Oktobra 30, 2007 at 1:18 am
atribut957 what in the world did you write?
Novambra 13, 2007 at 9:12 am
Hello
great component, although one question: is it possible to work with joomla user roles in the external database as well?
that way it would be possible to create users with their joomla user specified via my own database.
Novambra 13, 2007 at 10:33 am
To achieve this, I added ‘ $row->usertype = $sqlauth_user->usertype;’ before addign user to DB.
Is there anything against doing this?
Novambra 15, 2007 at 2:45 pm
Hi Hery,
Is it right that when using this component you are only able to login if the user is registrered in the external MySQL database and no longer if the user is just registered in the normal Joomla user table?
Thanks for helping!
Desambra 7, 2007 at 6:35 pm
I really needed this component. It works great too!
BUT…
The very first time you login, you need to login twice. Login attempt one does not log you in, it only puts the user data taken from the external DB into the joomla user database, but does not log you in. The 2nd time, it finds the user in the joomla user db and logs you in.
It’s only a small nuisance, but still not as it should be.
Can anything be done about this?
Thanks for your great addition!
Kind regards,
Erwin.
Desambra 14, 2007 at 7:01 pm
Hi,
I can’t download your zip file. Could you send to me?
Thanks a lot.
Louis
Desambra 21, 2007 at 7:14 pm
Hello! I have an external SQL table that contains names, usernames, passwords, and emails. I cannot get the users who are only in the external table to validate. Here’s the query:
SELECT regauth.serial as username, regauth.fulln as name, regauth.passw as password, regauth.email as email FROM mpsadmin_serials.regauth WHERE regauth.serial=’%{user}’ and regauth.passw=MD5(’%{pass}’)
Any ideas?
Desambra 22, 2007 at 5:24 am
yoooo!!! new [url=http://onlinefreeporn.net]free porn[/url] coming!
So here we start:
>>>>Some lesbo girls
Janoary 4, 2008 at 6:38 am
Hi,
I have downloaded and installed your component and module and have tried various ways to get it to work but my mySQL query statement skills are somewhat limited - I need some help which I am perfectly willing to pay for to get this going - nothing complicated and it is a simple database lookup from one server to another.
Hopefully there is still someone here.
Brian
Janoary 8, 2008 at 8:15 am
hi there, great mod!
however for some reason it only allows the first record to be inserted from my database into joomla - any ideas?
is there a how to guide at all??
Martsa 16, 2008 at 7:08 am
Are you ever going to make this work for Joomla 1.0.13? I would love for it to and don’t know how to go about changing code myself to do this…
Martsa 17, 2008 at 10:56 am
It should work for Joomla 1.0.x
I’ve just installed it for Joomla 1.0.15
There is a but that needs to be fixed. At the first time, the user is only registered but not logged in. He has to enter again the username to be logged-in
I’ll try to fix it.