The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat May 05, 2012 2:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 14, 2010 11:56 am
Posts: 26
I want to pull users from another database so in which file is defined from which database users are generated? i google'd a bit but cant find this line of code nowhere...

i need to change this
Code:
$db = JFactory::getDBO();
to this
Code:
$option = array(); //prevent problems
$option['driver']   = 'mysql';            // Database driver name
$option['host']     = 'db.myhost.com';    // Database host name
$option['user']     = 'fredbloggs';       // User for database authentication
$option['password'] = 's9(39s£h[%dkFd';   // Password for database authentication
$option['database'] = 'bigdatabase';      // Database name
$option['prefix']   = 'abc_';             // Database prefix (may be empty)
$db = & JDatabase::getInstance( $option );
so users are generated from another db... thanks all for help in advance...


Top
 Profile  
 
PostPosted: Sat May 05, 2012 11:14 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 3344
Location: Sydney, Australia
There is not need to hack any core Joomla files to authenticate users from a different database. The standard Joomla authentication is done in plugins/authentication/joomla/joomla.php. Based on that, you can develop your own plugin.

After your custom plugin has been installed, you can use the Plug-in Manager to disable the standard plugin 'Authentication - Joomla'.

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Sun May 06, 2012 2:00 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 14, 2010 11:56 am
Posts: 26
I dont need to authenticate nothing... I just need users to be pulled from another database that is on the same server and only different database.... Hope u understand... And i just need location of file that loads up users from database so i can put example code... Thanks... :eek:


Top
 Profile  
 
PostPosted: Sun May 06, 2012 8:14 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Thu Feb 15, 2007 5:48 am
Posts: 3344
Location: Sydney, Australia
Does that mean that you want to import users from a different database into Joomla, set the password and from then on manage them through User Manager?

_________________
toivo
my first programs were assembled and run in 16KB :)
http://archive.computerhistory.org/resources/text/GE/GE.GE-115SystemSoftware.1967.102646096.pdf#zoom=100


Top
 Profile  
 
PostPosted: Mon May 07, 2012 1:17 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 14, 2010 11:56 am
Posts: 26
NO i dont want to import. Because i have to manually export import and this no good... I want joomla to look in different database table when loading(registering, login etc)users... And i will manage them from starting database.


Top
 Profile  
 
PostPosted: Mon May 07, 2012 1:22 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri May 14, 2010 11:56 am
Posts: 26
so 1 database(table_users) - 3 sites -- 1 user single login and pass for all 3 sites...

what i have to do????
go to 2nd site and use code above to change so users can load from 1st database...

what do i need???
i need path to file that is responsible for loading users and checking for their login and pass...

hope that someone knows how joomla is developed so he can tell me the location of code responsible for loading users.... Thanks in advance...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 



Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group