Changeset 2768101
- Timestamp:
- 08/09/2022 12:33:20 AM (4 years ago)
- Location:
- fastcomments
- Files:
-
- 40 added
- 3 edited
-
tags/3.12.4 (added)
-
tags/3.12.4/.gitignore (added)
-
tags/3.12.4/LICENSE (added)
-
tags/3.12.4/README.md (added)
-
tags/3.12.4/README.txt (added)
-
tags/3.12.4/admin (added)
-
tags/3.12.4/admin/fastcomments-admin-advanced-settings-view.js (added)
-
tags/3.12.4/admin/fastcomments-admin-advanced-settings-view.php (added)
-
tags/3.12.4/admin/fastcomments-admin-manual-sync-view.js (added)
-
tags/3.12.4/admin/fastcomments-admin-manual-sync-view.php (added)
-
tags/3.12.4/admin/fastcomments-admin-setup-view.js (added)
-
tags/3.12.4/admin/fastcomments-admin-setup-view.php (added)
-
tags/3.12.4/admin/fastcomments-admin-sso-view.css (added)
-
tags/3.12.4/admin/fastcomments-admin-sso-view.js (added)
-
tags/3.12.4/admin/fastcomments-admin-sso-view.php (added)
-
tags/3.12.4/admin/fastcomments-admin-support-view.php (added)
-
tags/3.12.4/admin/fastcomments-admin-view.php (added)
-
tags/3.12.4/admin/fastcomments-admin.css (added)
-
tags/3.12.4/admin/fastcomments-admin.php (added)
-
tags/3.12.4/admin/images (added)
-
tags/3.12.4/admin/images/api.png (added)
-
tags/3.12.4/admin/images/crown.png (added)
-
tags/3.12.4/admin/images/css.png (added)
-
tags/3.12.4/admin/images/debugging.png (added)
-
tags/3.12.4/admin/images/download.png (added)
-
tags/3.12.4/admin/images/home.png (added)
-
tags/3.12.4/admin/images/logo-50.png (added)
-
tags/3.12.4/admin/images/logo.png (added)
-
tags/3.12.4/admin/images/settings.png (added)
-
tags/3.12.4/admin/images/support.png (added)
-
tags/3.12.4/admin/images/sync-status.png (added)
-
tags/3.12.4/admin/images/sync.png (added)
-
tags/3.12.4/core (added)
-
tags/3.12.4/core/FastCommentsIntegrationCore.php (added)
-
tags/3.12.4/core/FastCommentsWordPressIntegration.php (added)
-
tags/3.12.4/fastcomments-wordpress-plugin.php (added)
-
tags/3.12.4/public (added)
-
tags/3.12.4/public/fastcomments-public.php (added)
-
tags/3.12.4/public/fastcomments-widget-view.php (added)
-
tags/3.12.4/uninstall.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/fastcomments-wordpress-plugin.php (modified) (1 diff)
-
trunk/public/fastcomments-public.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fastcomments/trunk/README.txt
r2752858 r2768101 4 4 Requires at least: 4.6 5 5 Tested up to: 6.0 6 Stable tag: 3.12. 36 Stable tag: 3.12.4 7 7 Requires PHP: 5.2.5 8 8 License: GPLv2 or later … … 88 88 == Changelog == 89 89 90 = 3.12.4 = 91 * Fixing Malformed SSO message shown when SSO is enabled and nobody is logged in. The "login to comment" option is now shown as expected. 92 90 93 = 3.12.3 = 91 94 * Decreasing time to wait in some cases after setup complete. -
fastcomments/trunk/fastcomments-wordpress-plugin.php
r2752858 r2768101 14 14 } 15 15 16 $FASTCOMMENTS_VERSION = 3.12 3;16 $FASTCOMMENTS_VERSION = 3.124; 17 17 18 18 require_once plugin_dir_path(__FILE__) . 'admin/fastcomments-admin.php'; -
fastcomments/trunk/public/fastcomments-public.php
r2744374 r2768101 98 98 foreach ($get_comments_response->comments as $comment) { 99 99 $wp_comment = $fastcomments->fc_to_wp_comment($comment, true); 100 if (!wp_update_comment($wp_comment)) {100 if (!wp_update_comment($wp_comment)) { 101 101 wp_insert_comment($wp_comment); 102 102 } … … 162 162 $result['timestamp'] = $timestamp; 163 163 164 $is_admin = current_user_can('administrator'); 165 $is_moderator = current_user_can('moderate_comments'); 166 167 $sso_user = array(); 168 if ($wp_user) { 164 if ($wp_user && ($wp_user->user_email || $wp_user->display_name)) { 165 $sso_user = array(); 166 $is_admin = current_user_can('administrator'); 167 $is_moderator = current_user_can('moderate_comments'); 169 168 $sso_user['id'] = $wp_user->ID; 170 $sso_user['email'] = $wp_user->user_email; 171 $sso_user['username'] = $wp_user->display_name; 172 $sso_user['avatar'] = get_avatar_url($wp_user->ID, 95); 169 if ($wp_user->user_email) { 170 $sso_user['email'] = $wp_user->user_email; 171 } 172 if ($wp_user->display_name) { 173 $sso_user['username'] = $wp_user->display_name; 174 } 175 $avatar_url = get_avatar_url($wp_user->ID, 95); 176 if ($avatar_url) { 177 $sso_user['avatar'] = $avatar_url; 178 } 173 179 $sso_user['optedInNotifications'] = true; 174 180 $sso_user['isAdmin'] = $is_admin; 175 181 $sso_user['isModerator'] = $is_moderator; 182 $userDataJSONBase64 = base64_encode(json_encode($sso_user)); 183 $verificationHash = hash_hmac('sha256', $timestamp . $userDataJSONBase64, $ssoKey); 184 185 $result['userDataJSONBase64'] = $userDataJSONBase64; 186 $result['verificationHash'] = $verificationHash; 176 187 } 177 178 $userDataJSONBase64 = base64_encode(json_encode($sso_user));179 $verificationHash = hash_hmac('sha256', $timestamp . $userDataJSONBase64, $ssoKey);180 181 $result['userDataJSONBase64'] = $userDataJSONBase64;182 $result['verificationHash'] = $verificationHash;183 188 $result['loginURL'] = wp_login_url(); 184 189 $result['logoutURL'] = wp_logout_url();
Note: See TracChangeset
for help on using the changeset viewer.