Simple Neon Login is a WordPress plugin that allows users to log into a WordPress Blog/Website using a UserID and Password established and maintained on a z2Systems Neon CRM platform. This is accomplished by utilizing the API interface and tools provided by z2Systems.

Neon Alternative

I became aware in June 2016 that Neon has created a very similar plugin… Given that they will provide support I strongly urge anybody who is thinking about using my plugin to take a look at what they are offering first. Here is the URL to info about what they have to offer:

https://wordpress.org/support/plugin/neoncrm-sign-in

How It Works

Users supply their UserID and Password and log in utilizing standard WordPress login tools. This plugin will establish a connection to the designated Neon server and will then attempt to authenticate the credentials.

  • If they are valid, the user will be granted access to the WordPress site.
    • If the are not already entered in the WordPress Users table the program will make an entry for them (including thier First and Last Names and email address which is obtained from the Neon server).
  • If the users credentials are NOT authenticated the user is returned to the login screen. If the UserID exists in the WordPress Users table it will be deleted (there are exceptions to this rule… Usernames with Admin privileges will not be deleted, and Usernames listed in the Exempt Usernames field (see below) also will not be deleted). Note that when users are deleted in this manner any blog posts they authored will be deleted as well.

When combined with the Members plugin this provides a very effective ‘Members Only’ capability on WordPress.

WordPress Compatibility

This program was developed and tested on WordPress version 4.2, and is currently working with version 4.4.2.

The code was developed and tested on a Unix environment (Hostmonster and GreenGeeks). However, I have also learned that it runs on WordPress running on a Windows platform (2012R2) after updating PHP to the latest (as of March, 2016) version of 5.4 and installing the latest .pem file for SSL in Curl.

Support

Sorry, this page is all you get. Beyond that you are on your own… If it breaks you get to keep all of the pieces.

Debugging

If you do run into problems the most likely area of concern is probably going to be the interaction with Neon. This is performed in the authenticate function in the Simple-Neon-Login.php file. There are numerous commented-out echo statements that have //DEBUG comments above them: try un-commenting them to get some feedback as the program runs, which will (hopefully) help you figure out where the problem is.

Revision History

  • Version 1.0.0 – March 2015 – Initial Release
  • Version 1.1.0 – 17 January 2016 – Created to address problems with how user accounts were deleted. Version 1.0.0 was case sensitive when it compared User ID’s listed in the Locally Verified Usernames list with the User ID provided in the User. In some cases this led to the program deleting a User ID that was on the Locally Verified Usernames list.

Source Files

The files are contained in a tar formatted file (created using the tar -cf command). Download Version 1.1.0 tar File

Installation

  • Download and un-zip the files
    • Suggested command: tar -xf simple-neon-login.tar
  • Create the simple-neon-login directory in your WordPress/wp-content/plugins directory,
  • Copy the Simple-Neon-Login.php and Simple-Neon-Login-Admin.php there
  • Activate it (from Plugins -> Installed Plugins)
  • Configure it (from Settings -> Simple Neon Login. You’ll need your Neon Organization ID and Neon API key from Neon to complete this step.

——————————————

Strong Warning: This Plug-In  will delete ID’s from your WordPress site if the login attempt fails.

Be sure to add ID’s to the Local Verified Usernames list once you have it installed!

——————————————

Settings

Once installed and Activated a configuration page is made available (Simple Neon Settings under the WordPress Settings tab).

Enable Neon Authentication – This is a check box that enable (checked) or disables (unchecked) the plugin functionality.

New User Role – Sets the default roles for each user added to the WordPress Users table.

Neon Organization ID – A required value that can be obtained from Neon

Neon API Key – Another required value that can be obtained from Neon

Locally Verified Usernames – List all Usernames that you want to validate locally (via the normal WordPress process). These will NOT be deleted by the program if/when the Neon authentication fails.

If there are multiple usernames listed each entry should be separated using  a semi-colon with NO extra spaces.

For example: user1;user2;user3

It is a good idea to create an extra Admin account and several test accounts and list them here (technically you should not need to list the Admin accounts but listing them here is added level of security to insure that they do not get deleted inadvertently).

Additional Resources

What this program does NOT do

Accessing Neon with this program only provides access to defined API functions. So while this program does allow you to verify somebody’s credential from the Neon server, it does NOT support user access to the Neon platform. If a user wants to access functionality on the Neon system, they still must go to that web interface and log in.

Credit Where Credit Is Due

This program was based entirely on Cliff Griffin’s simple-LDAP-login plugin and, wherever possible, uses his original unchanged code. The LDAP specific functions and variables were removed and replaced with those required for the Neon login functions.

Created by Tony Hanson, former Webmaster for the Dallas Genealogical Society in March, 2015.

Updated: 24 March 2016