Jump to content
Sign in to follow this  
Redundant

Joomla Authentication Plugin | WHMCS

Recommended Posts

Howdy Folks,

 

This is an Authentication Plugin for Joomla 1.5 which uses the WHMCS API. It takes 3 Parameters required by the WHMCS API. Hopefully this plugin will help us get a little closer to a Joomla Bridge which is a frequent topic around here. See this thread.

 

Not a Bridge:

What this primarily lacks is simultaneous login to WHMCS. Hopefully someone can pitch in and help with this. Perhaps a CURL call embedded in this plugin to the DoLogin.php? (as suggested in this thread). I am not familiar with CURL.

 

Installation: Download the ZIP. In Joomla Admin, go to the menu: Extensions -> Install/Uninstall.

After installation, select Menu -> Extensions -> Plugin Manager. In the list displayed, select WHMCS-Authentication. Fill in the 3 parameters.

 

Hope some folks can test this plugin out. It is my first, so it may have some issues. It's pretty simple and straightforward.

 

Note:

I ran into some issues using API Calls when using .htaccess rewrite rules to force WHMCS to https. So if this plugin doesn't work, try removing your Rewrite rules for WHMCS+HTTPS).

 

Thank you kindly

whmcsauth.zip

Share this post


Link to post
Share on other sites

Well done... that is almost identical to what I just created but I have a little more error checking done and am working on the sessions problem now.

 

Something you forgot to say is when you log in (using the joomla login) it authenticates using the WHMCS DB and creates the user automatically in the joomla DB.

Share this post


Link to post
Share on other sites
Well done... that is almost identical to what I just created but I have a little more error checking done and am working on the sessions problem now.

 

Hey awesome. Really looking forward to what you come up with. I have been sitting here trying to get Curl+dologin to work without success.

 

Something you forgot to say is when you log in (using the joomla login) it authenticates using the WHMCS DB and creates the user automatically in the joomla DB.

 

Wow, well...I had to go look in the joomla users database to check out what you're talking about. I can't take credit for that, guess Joomla does that automatically :) Sweet.

Share this post


Link to post
Share on other sites

$response = JUser::getInstance();

That line is the culprit (its a good thing not a bad one)

 

The dologin thing wont work properly (been there already)

Share this post


Link to post
Share on other sites

I have a 1.57 test site that displays this error code at the top of the joomla site

 

Notice: Undefined offset: 1 in .../public_html/plugins/authentication/whmcsauth.php on line 87

 

 

And then the page displays...

 

Suggestions?

Share this post


Link to post
Share on other sites
Is the placement of the files the same in the joomla site?

Just install it as you would normally with any other joomla extension.

In Joomla Admin, go to Extensions -> Install/Uninstall. Browse for the zip file and install.

After installation, select Extensions -> Plugin Manager and fill in the details.

I noticed the file is encoded, a commercial plugin coming? :-)

Possible.... have not decided yet

Share this post


Link to post
Share on other sites

Thanks... I'll have some time tomorrow morning to go over it., it's 1 AM here...

 

Have you gone as far as looking at authentication based on whether the whmcs user is active, has a valid membership or has purchased a specific product?

 

...Just wondering

Share this post


Link to post
Share on other sites
The configuration requests the whmcsdb details are you writing to it or do you only need read access?

Read only for now.... There are other plans for it later

 

Have you gone as far as looking at authentication based on whether the whmcs user is active, has a valid membership or has purchased a specific product?

 

As you asked

1. Yes but not in that beta version

2. If the user does not exist in WHMCS then he does not have a membership

3. Will look into that for later...

Share this post


Link to post
Share on other sites

I'm new to WHMCS and currently evaluating it.

I would like WHMCS and Joomla 1.5 to share login, so I'm happy to join in the discussion & development of a Joomla/WHMCS loginshare or bridge.

 

Joomla is Open Source with a GPL licence

 

Sparky, you will no doubt have used Joomla GPL code to build your WHMCS-Joomla1.5-Auth extension

Therefore you have to pass the code on under the same licence.

 

From the Joomla site:

Does the license allow someone to encrypt an extension?

Yes, technically, but the distributor must provide access to the complete and unencrypted source code by either including it in the package or by making it available for download.

 

Sparky, can you supply an unencrypted version so that you comply with the Joomla Licence and so we can all help to develop a loginshare/bridge.

 

cheers

 

Jim

Share this post


Link to post
Share on other sites
I'm new to WHMCS and currently evaluating it.

I would like WHMCS and Joomla 1.5 to share login, so I'm happy to join in the discussion & development of a Joomla/WHMCS loginshare or bridge.

 

Joomla is Open Source with a GPL licence

 

Sparky, you will no doubt have used Joomla GPL code to build your WHMCS-Joomla1.5-Auth extension

Therefore you have to pass the code on under the same licence.

 

From the Joomla site:

Does the license allow someone to encrypt an extension?

Yes, technically, but the distributor must provide access to the complete and unencrypted source code by either including it in the package or by making it available for download.

 

Sparky, can you supply an unencrypted version so that you comply with the Joomla Licence and so we can all help to develop a loginshare/bridge.

 

cheers

 

Jim

Jim, if thats the joomla rules then no problem.

The download has been removed and is no longer available.

I have other projects to do anyway.

Share this post


Link to post
Share on other sites

A joomla/WHMCS authentication can be party compleated with this.

http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,3444/Itemid,35/

 

It won't create the session but with some minipulation and looking at some of the other posts it is possible to get an extention that can do it.

I think the name of the session variable was mentioned before.

Share this post


Link to post
Share on other sites

Anyone looking to pick this Bridge project up, I have been examining Jfusion which is an open source project geared towards bridging Joomla with Bulletin boards and other software.

 

After some struggles with the sample Plugin in the downloads section, I was directed to the SVN (http://code.google.com/p/jfusion/) which proved to be the best place to start with more mature code. Some solid bulletin board projects have been completed and a sample starter-plugin is also included with the install. A good amount of sample code is included regarding session handling, db connection, and all of the completed BB plugins are there for samples too.

 

Someone with solid PHP skills would probably find the JFusion plugin's a breeze. They work pretty much the same as Joomla plugins.

 

thanks

Share this post


Link to post
Share on other sites

I'd like to test it, is it available for testing?

 

Does it allow ANY registered whmcs user access to the joomla site, or can it be configured to allow only certain product/hosting plan owners login access?

Share this post


Link to post
Share on other sites

Sorry I forgot to tell that my joomla module is NOT login share or bridge the purpose of the module is bypass joomla session, normally you can't use WHMCS integrate code inside joomla module (I mean module can't return login status or it's mean integrate code didn't work like it should be only HTML code work but not PHP)

 

I closed joomla user system and use WHMCS instead so I don't need to bridge or login share just use WHMCS customer system.

Share this post


Link to post
Share on other sites
Sorry I forgot to tell that my joomla module is NOT login share or bridge the purpose of the module is bypass joomla session, normally you can't use WHMCS integrate code inside joomla module (I mean module can't return login status or it's mean integrate code didn't work like it should be only HTML code work but not PHP)

 

I closed joomla user system and use WHMCS instead so I don't need to bridge or login share just use WHMCS customer system.

 

This would work fine for me. Is this module available for download?

 

Thanks,

 

G

Share this post


Link to post
Share on other sites

Count me in as well... I just wan to have a single email address/password combination that works on both whmcs.com and joomla with the whmcs client area providing the master profile...

 

Is there a download available?

Share this post


Link to post
Share on other sites

I have implemented the original module posted, with a few changes. Thanks very much.

 

Though it would be ideal to have the 'bridge' (I think it was referred to) function, just having it take the client to WHMCS is useful to me.

 

I changed modules/mod_whmcs/mod_whmcs.php so it posts securely (https://) and takes the client to my own WHMCS as well as added the closing (input) tags and <br> tags as suggested.

 

Thanks again,

 

G

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated