Page 1 of 1

Add User into Joomla DB from 3rd Party Script

Posted: Mon Oct 29, 2007 1:15 pm
by Westoner
Hi,

I have a 3rd party script that takes User name, email address and password during the registration process. I would like to take that info and create an account in Joomla so I can then use Joomla to control the access rights of the returning user.

I'm no coder, so I'm looking for a lot of help here or maybe there's a job opportunity for someone (hope it's ok to say that)...

Thanks
Chris

Re: Add User into Joomla DB from 3rd Party Script

Posted: Sat Nov 03, 2007 4:40 pm
by lobos
You will need to connect to the joomla database and use the following sql  to inject the user:

$sql = "INSERT INTO jos_users (
name,
username,
email,
password,
usertype,
gid,
registerDate
)
VALUES
('$full_name', '$username', '$email', '$password', 'Registered', '18', '$date')";

-Lobos

Re: Add User into Joomla DB from 3rd Party Script

Posted: Sat Nov 03, 2007 5:21 pm
by Opie
Aren't there some other tables that are required to be updated?

Re: Add User into Joomla DB from 3rd Party Script

Posted: Mon Nov 12, 2007 2:13 pm
by lobos
Opie wrote:Aren't there some other tables that are required to be updated?


Hmmm I don't think so, I did this awhile back so I am not 100% sure, but try it anyway and see if it works :)

-Lobos

Re: Add User into Joomla DB from 3rd Party Script

Posted: Mon Nov 12, 2007 2:16 pm
by Tonie
You also need jos_core_acl_aro and jos_core_acl_groups_aro_map. Here's a faq to add an admin password, but can naturally also been used for other users.