Fixes for Data Abstract crypt password when no password supplied, source code spacing...
authorChuck Scott <cscott@gaslightmedia.com>
Thu, 16 Nov 2017 14:36:14 +0000 (09:36 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Thu, 16 Nov 2017 14:36:14 +0000 (09:36 -0500)
controllers/front.php
lib/GlmDataAbstract/DataAbstract.php
views/admin/management/hooks.html

index 7357523..50a4617 100644 (file)
@@ -639,20 +639,17 @@ class glmMembersFront extends GlmPluginSupport
         date_default_timezone_set($defaultTimeZone);
 
 
-// If we have a cache code, then this is a top-level caching request
-if ($cache_code) {
-
-    // Cache this request page content
-    $sql = $this->wpdb->prepare("INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."cache (shortcode, cache_code, created, html) VALUES (%s, %s, now(), %s);", $shortcode, $cache_code, $out);
-    $this->wpdb->query($sql);
-
-    // Mark cache control as complete
-    $GLOBALS['cache_control']['complete'] = true;
-
-}
+        // If we have a cache code, then this is a top-level caching request
+        if ($cache_code) {
 
+            // Cache this request page content
+            $sql = $this->wpdb->prepare("INSERT INTO ".GLM_MEMBERS_PLUGIN_DB_PREFIX."cache (shortcode, cache_code, created, html) VALUES (%s, %s, now(), %s);", $shortcode, $cache_code, $out);
+            $this->wpdb->query($sql);
 
+            // Mark cache control as complete
+            $GLOBALS['cache_control']['complete'] = true;
 
+        }
 
         return $out;
 
index ebde834..a7a0e86 100644 (file)
@@ -1385,7 +1385,7 @@ $forEdit = true;
                // Don't try to crypt a blank password
                $c = '';
                if ($in != '') {
-               $c = crypt($in);
+                   $c = password_hash($in, PASSWORD_DEFAULT);
                }
 
        return $c;
index 3b06a58..d05b96d 100644 (file)
@@ -9,8 +9,8 @@
         content on this page.
     </p>
     
-    <table class="glm-admin-table">
-        <tr><th>Hook</th><th>Type</th><th>Added Parameters</th><th>Description</th></tr>
+    <table class="glm-admin-table" style="width: 100%;">
+        <tr><th>Hook</th><th>Type</th><th>Added&nbsp;Parameters</th><th>Description</th></tr>
             {apply_filters('glm-member-db-admin-management-hooksHelp', '')}
     </table>