tim Posted February 19, 2007 Share Posted February 19, 2007 ok, I've searched and searched, then started over. There is tons of talk about WHMCS and Joomla, mainly in reference to templates and look/feel. Does anyone know how to combine the username/password database for Joomla & WHMCS? It would be so nice if users could just login to joomla, and be already logged into WHMCS. Just my 2c. Thanks Tim 0 Quote Link to comment Share on other sites More sharing options...
davet Posted August 30, 2007 Share Posted August 30, 2007 Yes I agree. It would be nice if there was a component version for Joomla as well instead of just a bridge. 0 Quote Link to comment Share on other sites More sharing options...
Roger Posted August 30, 2007 Share Posted August 30, 2007 A Joomla component or module would be pretty cool. Maybe this thread should be moved to the Joomla site to generate some interest from their community... 0 Quote Link to comment Share on other sites More sharing options...
trine Posted August 30, 2007 Share Posted August 30, 2007 this could work (best) if you use WHMCS as your login, assuming you have adapted the session code in Mambo or Joomla. You should use 1 set of user/passwords only, otherwise you need to synch the databases. 0 Quote Link to comment Share on other sites More sharing options...
joemailey Posted November 2, 2007 Share Posted November 2, 2007 I'd also like this, Preferable a bridge. Not really a bridge. Something that will sync WHMCS accounts with joomla. So when you signup to WHMCS you can login to my forum also. This would help for those who bridge SMF forum PHPBB forums to. 0 Quote Link to comment Share on other sites More sharing options...
Multipack Posted January 4, 2008 Share Posted January 4, 2008 A Joomla component or module would be pretty cool. Maybe this thread should be moved to the Joomla site to generate some interest from their community... Absolutely !!! But there has to be official addon made first. 0 Quote Link to comment Share on other sites More sharing options...
angelcosta Posted February 1, 2008 Share Posted February 1, 2008 such thing has been already done. check http://www.joomlancers.com I think if we can gather money, we can hire someone to do it. then we can make it available somewhere for free (for the community) 0 Quote Link to comment Share on other sites More sharing options...
worsin Posted July 1, 2008 Share Posted July 1, 2008 I am more than willing to pay for this. 0 Quote Link to comment Share on other sites More sharing options...
angelcosta Posted September 29, 2008 Share Posted September 29, 2008 I am working on it what features would you guys like to see? 0 Quote Link to comment Share on other sites More sharing options...
cubemedia Posted October 3, 2008 Share Posted October 3, 2008 that would be pretty cool 0 Quote Link to comment Share on other sites More sharing options...
jtrag Posted October 20, 2008 Share Posted October 20, 2008 Has this ever been completed? If so, could you please provide us with a link to the bridge? Thanks in advance! 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted October 21, 2008 Share Posted October 21, 2008 Has this ever been completed? If so, could you please provide us with a link to the bridge? Thanks in advance! Im thinking about doing something now. More of a module than a bridge. But i have to read the code more. Its a matter of weather we insert details into the J! db. But i am looking at making some modules that allow you to insert the WHMCS cart and items. 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted October 24, 2008 Share Posted October 24, 2008 this is EXTREMELY easy to do. just write a short function to make the following call to the WHMCS API while storing the user's joomla profile info in an array called $DetailArray: $url = "api.php"; # URL to WHMCS API file $username = "admin"; # Admin username goes here $password = "admin"; # Admin password goes here $postfields["username"] = $username; $postfields["password"] = md5($password); $postfields["action"] = "addclient"; $postfields["firstname"] = $Detail_Array[firstname]; $postfields["lastname"] = $Detail_Array[lastname]; $postfields["companyname"] = $Detail_Array[business]; $postfields["email"] = $Detail_Array[email]; $postfields["address1"] = $Detail_Array[address]; $postfields["address2"] = $Detail_Array[address2]; $postfields["city"] = $Detail_Array[city]; $postfields["state"] = $Detail_Array[state]; $postfields["postcode"] = $Detail_Array[postcode]; $postfields["country"] = "AU"; $postfields["phonenumber"] = $Detail_Array[phone]; $postfields["password2"] = $Detail_Array[password]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } if ($results["result"]=="success") { # Result was OK! echo("Success, new client id is ". $results["clientid"]); } else { # An error occured echo "The following error occured: ".$results["message"]; } then just save the user's $clientID into a field in the joomla user table. You can then submit their username and password to the WHMCS login page using a link on your joomla homepage. We did the same thing on our website, but we dont use Joomla. its the same deal though. I've never actually used Joomla, but if it's writen in PHP with MySQL, then you should be able to use this code (mostly borrowed from the WHMCS API documentation) to do what you want to do. 0 Quote Link to comment Share on other sites More sharing options...
Shaun Posted October 24, 2008 Share Posted October 24, 2008 This is kinda th idea but most people want to user WHMCS as the master and then have the data goto into Joomla!. Its possible using the plugin auth of Joomla! to make this module. 0 Quote Link to comment Share on other sites More sharing options...
jtrag Posted October 24, 2008 Share Posted October 24, 2008 Excellent! Thank you. I take it there are no pre-made modules/components for Joomla to do this yet? 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted October 26, 2008 Share Posted October 26, 2008 This is kinda th idea but most people want to user WHMCS as the master and then have the data goto into Joomla!. Its possible using the plugin auth of Joomla! to make this module. why would people want the WHMCS to be the master account creation page? People use Joomla! so it's the frontend, not the backend. Then again I can't imagine what's going through the heads of people who use Joomla! anyway, so I can't really say much to contribute 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted October 27, 2008 Share Posted October 27, 2008 @Kl, no think you mis-understand. Shaun is talking from a frontend perpsective. Perhaps a detailed description might help. Imagine that all your dynamic content is on a joomla site, but logins and users management are done using a WHMCS login. When a user logs into whmcs (either in the WHMCS section or on a WHMCS login box with the Joomla area), WHMCS user info is bridged (& obviously inserted) to Joomla user data. Sessions/ cookie session handling then allows Joomla content to be displayed that is available only to Joomla registered users. This sessions handling then needs to be maintained between transitions betwwen joomla & WHMCS parts of the site. tehn all it takes is some good templating to give the 2 parts of the site a cohesive look, eliminating the need to use a joomla wrapper. hope this adds some clarity 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted October 27, 2008 Share Posted October 27, 2008 ah yeah i get what you're saying. I chose to build my own user database and my own login/logout/details system (in effect, the same as using Joomla! to manage users) and I didn't wanna use WHMCS' addin content for logging in. Basically I didn't wanna use any WHMCS page content on my system, I just wanted to API as much as possible. If you're willing to use WHMCS addins then I guess it's best to make WHMCS the master credential handler then. Makes sense. edit: the reason being that we are a fully fledged ISP, and WHMCS only handles the hosting part of our services, so people will be making accounts and adding internet services. It's not until they chose "Add Hosting Service" that the WHMCS API is called and duplicates their credentials into a WHMCS account. 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted October 28, 2008 Share Posted October 28, 2008 Cheers K. That also makes more sense. There's been so much talk about this topic, that SOME-ONE has to make a start. For those who are looking to do this, I've come across a piece of code that could open a joomla session from within whmcs (step 2 from my post above). So lets see if we can get a couple of others that know more about coding than I, to run with this towards a bridge. Re user syncing, i have some other code snippets that could be useful, but I'm gonna hang on to them in case there's no community interest from here. Note: I haven't yet got this running, but it comes from a trusted source. //=========================================================================== // START JOOMLA define( '_VALID_MOS', 1 ); header('Content-Type: text/html; charset=iso-8859-1'); // search for config if (file_exists('configuration.php')) require_once('configuration.php'); else if (file_exists('../configuration.php')) require_once('../configuration.php'); else if (file_exists('../../configuration.php')) require_once('../../configuration.php'); else if (file_exists('../../../configuration.php')) require_once('../../../configuration.php'); require_once($mosConfig_absolute_path.'/includes/joomla.php'); require_once($mosConfig_absolute_path.'/includes/database.php'); require_once($mosConfig_absolute_path.'/includes/sef.php'); require_once( $mosConfig_absolute_path .'/includes/frontend.php' ); // load Language if (file_exists($mosConfig_absolute_path.'/language/' . $mosConfig_lang . '.php')) include_once($mosConfig_absolute_path.'/language/' . $mosConfig_lang . '.php'); else include_once($mosConfig_absolute_path.'/language/english.php'); // Load dB if ( $mosConfig_db != "") { $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix ); } $mainframe = new mosMainFrame( $database, '', '.' ); // $mainframe->initSession(); // JOOMLA STARTED //=========================================================================== 0 Quote Link to comment Share on other sites More sharing options...
mysmallbizu Posted October 28, 2008 Share Posted October 28, 2008 Joomla 1.5 la has a API that should be used... at least to sync usernames/email addresses and passwords from whmcs to joomla. http://api.joomla.org/ http://docs.joomla.org/Framework which includes calls to add/edit users http://docs.joomla.org/Framework#User Anyone interested in working on it? 0 Quote Link to comment Share on other sites More sharing options...
Redundant Posted October 28, 2008 Share Posted October 28, 2008 (edited) @Zorro - Howdy Zorro | I believe that code is from Joomla 1.0. All the "mos" stuff (mosMainFrame, mosConfig, etc) I believe is gone with Joomla 1.5. I need this bridge too, for similar reasons you explained in an earlier post. Well put. I'm starting to work on it, but am hindered by poor PHP skills. To add to mysmallbizu fine list above, here is an outstanding article on Joomla Authentication: http://docs.joomla.org/Tutorial:Creating_an_Authentication_Plugin_for_Joomla_1.5 Seems the largest gap in this bridge is WHMC's lack of a API call to log users in? (Related Link: http://forum.whmcs.com/showthread.php?t=14557&highlight=joomla) plugging away, looking forward to any other thoughts on this... Edited October 28, 2008 by Redundant typos 0 Quote Link to comment Share on other sites More sharing options...
Zorro67 Posted October 28, 2008 Share Posted October 28, 2008 @Redundant, yes, sorry should have qualified that I'm using 1.0.x Haven't done the upgrade yet, as not all our in use components were 1.5.x compliant, and am too busy to take the upgrade route yet. So there are a couple of alternatives. Joomla 1.0.x/ 1.5.x WHMCS as master or slave (for want of better terms) 0 Quote Link to comment Share on other sites More sharing options...
mysmallbizu Posted October 29, 2008 Share Posted October 29, 2008 There are open source plugins for both 1.0 and 1.5 that allow for remote mySql authentication. The nice part is that the existing plugins handle all the authentiation issues like sessions/cookies etc... The only reason they dont' work now is because of the way that Whmcs encrypts the passwords. Perhaps this existing code can be used as a base. All that's needed is the inclusion of the whmcs api call to decrypt the password from the whmcs user table. Here are the two existing plugins 1.0 MySQL Auth http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,642/Itemid,35/ 1.5 MySQL Auth 1.5 http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,3444/Itemid,35/ I'm currently using amember.com and their joomla plugin to handle my subscriptions and billing for my membership sites... but would love to consolidate my hosting and joomla business billing with whmcs. If anyone wants to learn more about Joomla Membership sites I have videos availalbe at http://www.joomlamembershipsite.com 0 Quote Link to comment Share on other sites More sharing options...
Redundant Posted October 29, 2008 Share Posted October 29, 2008 @mymallbizu - Heya. Thanks for the links. Big help. I have created an Authentication Plugin which could used some testing. This really doesn't help a whole lot, seeing how it doesn't also log the user into WHMCS. Perhaps someone can help with that. The idea presented in this thread about CURL is interesting, but I do not know CURL... The other issue I guess is the reverse. If the user logs in or out of WHMCS it doesn't affect the login status for the Joomla side of things... Looking forward to anymore thoughts on all this. 0 Quote Link to comment Share on other sites More sharing options...
gwhosting Posted November 2, 2008 Share Posted November 2, 2008 i would like to see something like this. What i was thinking, not sure how i would do this coding isn't my best thing is, to be able to login to joomla and pass login information into whmcs. Could you do the following? I know this isn't very very secure but: 1. user registers on joomla's site. 2. user enters there whmcs username and password into a forum 3. user information is saved into a database. 4. when someone logs into joomla, the information is taken from the database where they entered the whmcs information into it and passes this into the login form on whmcs. 5. they are logged in? would that work? just an idea, and not sure if it could even work. mike 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.