Fixed problem with not retrieving plugin configuration parameters in some cases. hotfix/2.9.17
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 1 Jun 2017 18:18:28 +0000 (14:18 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 1 Jun 2017 18:18:28 +0000 (14:18 -0400)
index.php
readme.txt

index d48510b..10f4a7d 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 2.9.16
+ * Version: 2.9.17
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -38,7 +38,7 @@
  *
  */
 
-define('GLM_MEMBERS_PLUGIN_VERSION', '2.9.16');
+define('GLM_MEMBERS_PLUGIN_VERSION', '2.9.17');
 define('GLM_MEMBERS_PLUGIN_DB_VERSION', '1.1.31');
 
 // Check if plugin version is not current in WordPress option and if needed updated it
@@ -349,31 +349,6 @@ require_once GLM_MEMBERS_PLUGIN_PATH . '/classes/glmPluginSupport.php';
 // Load Smarty Template Support
 require_once GLM_MEMBERS_PLUGIN_PATH . '/lib/smartyTemplateSupport.php';
 
-/*
- *  Hook through which an add-on may supply additional logged in user information and
- *  have that data stored in the config array. Typically it would be the
- *  glm-members-db-contacts add-on supplying the information.
- *
- *  This hook provides default data with the current WordPress user 'data' object
- *  as a 'wpUser' sub-array if a WordPress user is logged in. If not 'wpUser' will
- *  be false. The supplied data is the basic information on the WordPress user
- *  provided by the 'data' object from wp_get_current_user().
- *
- *  To permit more than one routine to access this filter and therefore to supply
- *  additional information on the logged in user, code may merge it's own data or may
- *  add another sub-array containing user information specific to an add-on (i.e.
- *  contacts add-on might supply a 'contactUser' sub-array).
- *
- */
-if (function_exists('is_user_logged_in')) {
-    $config['loggedInUser'] = array(
-        'wpUser' => false
-    );
-    if (is_user_logged_in()) {
-        $config['loggedInUser']['wpUser'] = (array) wp_get_current_user()->data;
-    }
-    $config['loggedInUser'] = apply_filters('glm_members_current_logged_in_user', $config['loggedInUser']);
-}
 
 // Check all database tables for all registered add-ons, allow install/update
 if (glmCheckDatabase('install')) {
@@ -415,6 +390,32 @@ if (glmCheckDatabase('install')) {
 
 } // have databases
 
+/*
+ *  Hook through which an add-on may supply additional logged in user information and
+ *  have that data stored in the config array. Typically it would be the
+ *  glm-members-db-contacts add-on supplying the information.
+ *
+ *  This hook provides default data with the current WordPress user 'data' object
+ *  as a 'wpUser' sub-array if a WordPress user is logged in. If not 'wpUser' will
+ *  be false. The supplied data is the basic information on the WordPress user
+ *  provided by the 'data' object from wp_get_current_user().
+ *
+ *  To permit more than one routine to access this filter and therefore to supply
+ *  additional information on the logged in user, code may merge it's own data or may
+ *  add another sub-array containing user information specific to an add-on (i.e.
+ *  contacts add-on might supply a 'contactUser' sub-array).
+ *
+ */
+if (function_exists('is_user_logged_in')) {
+    $config['loggedInUser'] = array(
+        'wpUser' => false
+    );
+    if (is_user_logged_in()) {
+        $config['loggedInUser']['wpUser'] = (array) wp_get_current_user()->data;
+    }
+    $config['loggedInUser'] = apply_filters('glm_members_current_logged_in_user', $config['loggedInUser']);
+}
+
 /*
  *
  * Determine which controller to load
index e9022d8..a3c9a43 100644 (file)
@@ -67,7 +67,8 @@ There is of course much more to this.
 
 == Changelog ==
 
-= 2.9.15 =
+= 2.9.17 =
+
+* Fixed login contact permission issues where there were difficulties reading the current contact role.
 
-Current version.