Social Login - Version 6.2.1

Version Description

  • Bug fix
Download this release

Release Info

Developer cyberlord92
Plugin Icon 128x128 Social Login
Version 6.2.1
Comparing to
See all releases

Code changes from version 6.2.0 to 6.2.1

Files changed (2) hide show
  1. miniorange_openid_sso_settings.php +46 -44
  2. readme.txt +7 -1
miniorange_openid_sso_settings.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Social Login, Social Sharing by miniOrange
5
  * Plugin URI: https://www.miniorange.com
6
  * Description: Allow your users to login, comment and share with Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
7
- * Version: 6.2.0
8
  * Author: miniOrange
9
  * Author URI: https://www.miniorange.com
10
  * License: GPL2
@@ -25,6 +25,7 @@ class Miniorange_OpenID_SSO {
25
  add_action( 'admin_init', array( $this, 'miniorange_openid_save_settings' ) );
26
 
27
  add_action( 'plugins_loaded', array( $this, 'mo_login_widget_text_domain' ) );
 
28
  add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_style' ) );
29
  add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_script' ) );
30
  add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_style' ) ,5);
@@ -205,9 +206,7 @@ class Miniorange_OpenID_SSO {
205
  // create mo_openid_linked_user if it doesn't exist
206
  // + add entries in wp_mo_openid_linked_user table
207
  // + remove columns app name and identifier from wp_users table
208
- function mo_openid_activate() {
209
- add_option('Activated_Plugin','Plugin-Slug');
210
-
211
  global $wpdb;
212
  $table_name = $wpdb->prefix . 'mo_openid_linked_user';
213
  $charset_collate = $wpdb->get_charset_collate();
@@ -224,55 +223,58 @@ class Miniorange_OpenID_SSO {
224
 
225
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
226
  dbDelta($sql);
227
- }
228
 
229
- $identifier = $wpdb->get_var("SELECT COLUMN_NAME
230
  FROM information_schema.COLUMNS
231
  WHERE
232
  TABLE_NAME = '$wpdb->users'
233
  AND COLUMN_NAME = 'identifier'");
234
 
235
- if(strcasecmp( $identifier, "identifier") == 0 ){
236
-
237
- $count= $wpdb->get_var("SELECT count(ID) FROM $wpdb->users WHERE identifier not LIKE ''");
238
- $result= $wpdb->get_results("SELECT * FROM $wpdb->users WHERE identifier not LIKE ''");
239
-
240
- for($icnt = 0; $icnt < $count; $icnt = $icnt + 1){
241
-
242
- $provider = $result[$icnt]->provider;
243
- $split_app_name = explode('_', $provider);
244
- $provider = strtolower($split_app_name[0]);
245
- $user_email = $result[$icnt]->user_email;
246
- $ID = $result[$icnt]->ID;
247
- $identifier = $result[$icnt]->identifier;
248
-
249
- $output = $wpdb->insert(
250
- $table_name,
251
- array(
252
- 'linked_social_app' => $provider,
253
- 'linked_email' => $user_email,
254
- 'user_id' => $ID,
255
- 'identifier' => $identifier
256
- ),
257
- array(
258
- '%s',
259
- '%s',
260
- '%d',
261
- '%s'
262
- )
263
- );
264
- if($output === false){
265
- /*$wpdb->show_errors();
266
- $wpdb->print_error();
267
- exit;*/
268
- wp_die('Error in insert Query');
269
- }
270
 
 
 
 
271
  }
272
- $wpdb->get_var("ALTER TABLE $wpdb->users DROP COLUMN provider");
273
- $wpdb->get_var("ALTER TABLE $wpdb->users DROP COLUMN identifier");
274
-
275
  }
 
 
 
 
276
  }
277
 
278
  function mo_openid_add_social_login(){
4
  * Plugin Name: Social Login, Social Sharing by miniOrange
5
  * Plugin URI: https://www.miniorange.com
6
  * Description: Allow your users to login, comment and share with Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
7
+ * Version: 6.2.1
8
  * Author: miniOrange
9
  * Author URI: https://www.miniorange.com
10
  * License: GPL2
25
  add_action( 'admin_init', array( $this, 'miniorange_openid_save_settings' ) );
26
 
27
  add_action( 'plugins_loaded', array( $this, 'mo_login_widget_text_domain' ) );
28
+ add_action( 'plugins_loaded', array( $this, 'mo_openid_plugin_update' ),1 );
29
  add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_style' ) );
30
  add_action( 'admin_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_script' ) );
31
  add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_settings_style' ) ,5);
206
  // create mo_openid_linked_user if it doesn't exist
207
  // + add entries in wp_mo_openid_linked_user table
208
  // + remove columns app name and identifier from wp_users table
209
+ function mo_openid_plugin_update(){
 
 
210
  global $wpdb;
211
  $table_name = $wpdb->prefix . 'mo_openid_linked_user';
212
  $charset_collate = $wpdb->get_charset_collate();
223
 
224
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
225
  dbDelta($sql);
 
226
 
227
+ $identifier = $wpdb->get_var("SELECT COLUMN_NAME
228
  FROM information_schema.COLUMNS
229
  WHERE
230
  TABLE_NAME = '$wpdb->users'
231
  AND COLUMN_NAME = 'identifier'");
232
 
233
+ if(strcasecmp( $identifier, "identifier") == 0 ){
234
+
235
+ $count= $wpdb->get_var("SELECT count(ID) FROM $wpdb->users WHERE identifier not LIKE ''");
236
+ $result= $wpdb->get_results("SELECT * FROM $wpdb->users WHERE identifier not LIKE ''");
237
+
238
+ for($icnt = 0; $icnt < $count; $icnt = $icnt + 1){
239
+
240
+ $provider = $result[$icnt]->provider;
241
+ $split_app_name = explode('_', $provider);
242
+ $provider = strtolower($split_app_name[0]);
243
+ $user_email = $result[$icnt]->user_email;
244
+ $ID = $result[$icnt]->ID;
245
+ $identifier = $result[$icnt]->identifier;
246
+
247
+ $output = $wpdb->insert(
248
+ $table_name,
249
+ array(
250
+ 'linked_social_app' => $provider,
251
+ 'linked_email' => $user_email,
252
+ 'user_id' => $ID,
253
+ 'identifier' => $identifier
254
+ ),
255
+ array(
256
+ '%s',
257
+ '%s',
258
+ '%d',
259
+ '%s'
260
+ )
261
+ );
262
+ if($output === false){
263
+ /*$wpdb->show_errors();
264
+ $wpdb->print_error();
265
+ exit;*/
266
+ wp_die('Error in insert Query');
267
+ }
268
 
269
+ }
270
+ $wpdb->get_var("ALTER TABLE $wpdb->users DROP COLUMN provider");
271
+ $wpdb->get_var("ALTER TABLE $wpdb->users DROP COLUMN identifier");
272
  }
 
 
 
273
  }
274
+ }
275
+
276
+ function mo_openid_activate() {
277
+ add_option('Activated_Plugin','Plugin-Slug');
278
  }
279
 
280
  function mo_openid_add_social_login(){
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.miniorange.com
4
  Tags: social login, social, facebook, twitter, login
5
  Requires at least: 2.0.2
6
  Tested up to: 4.9.4
7
- Stable tag: 6.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -160,6 +160,9 @@ Please email us at info@miniorange.com. You can also submit your query from the
160
 
161
 
162
  == Changelog ==
 
 
 
163
  = 6.2.0 =
164
  * Fix for Unresolved Error in Insert Query
165
 
@@ -446,6 +449,9 @@ Please email us at info@miniorange.com. You can also submit your query from the
446
  * First version of Social Login, Social Sharing plugin.
447
 
448
  == Upgrade Notice ==
 
 
 
449
  = 6.2.0 =
450
  * Fix for Unresolved Error in Insert Query
451
 
4
  Tags: social login, social, facebook, twitter, login
5
  Requires at least: 2.0.2
6
  Tested up to: 4.9.4
7
+ Stable tag: 6.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
160
 
161
 
162
  == Changelog ==
163
+ = 6.2.1 =
164
+ * Bug fix
165
+
166
  = 6.2.0 =
167
  * Fix for Unresolved Error in Insert Query
168
 
449
  * First version of Social Login, Social Sharing plugin.
450
 
451
  == Upgrade Notice ==
452
+ = 6.2.1 =
453
+ * Bug fix
454
+
455
  = 6.2.0 =
456
  * Fix for Unresolved Error in Insert Query
457