Social Login - Version 7.1.6

Version Description

  • Fixed Non-English Character issue in the username.
  • Fixed the role mapping error message while login.
  • Fixed Whatsapp Sharing image issue.
Download this release

Release Info

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

Code changes from version 7.1.5 to 7.1.6

class-mo-openid-login-widget.php CHANGED
@@ -1261,11 +1261,13 @@ include "twitter_oauth.php";
1261
  }
1262
  exit;
1263
  }
1264
- else if ((isset($_POST['appname'])) && (isset($_POST['test_configuration']))){
 
1265
  update_option( 'mo_openid_test_configuration', 1);
1266
  exit;
1267
  }
1268
- else if( isset( $_POST['option'] ) and strpos( $_POST['option'], 'mo_openid_show_profile_form' ) !== false ){
 
1269
  echo mo_openid_profile_completion_form($_POST["last_name"],$_POST["first_name"], $_POST["user_full_name"],$_POST["user_url"], $_POST["user_picture"], $_POST['username_field'], $_POST['email_field'],$_POST["decrypted_app_name"],$_POST["decrypted_user_id"]);
1270
  exit;
1271
  }
@@ -1619,6 +1621,15 @@ include "twitter_oauth.php";
1619
  $decrypted_last_name = isset($_POST['lastName']) ? mo_openid_decrypt_sanitize($_POST['lastName']): '';
1620
  $decrypted_app_name = isset($_POST['appName']) ? mo_openid_decrypt_sanitize($_POST['appName']): '';
1621
  $decrypted_user_id = isset($_POST['userid']) ? mo_openid_decrypt_sanitize($_POST['userid']): '';
 
 
 
 
 
 
 
 
 
1622
 
1623
  $decrypted_app_name = mo_openid_filter_app_name($decrypted_app_name);
1624
 
@@ -2085,8 +2096,7 @@ include "twitter_oauth.php";
2085
  }
2086
  }
2087
 
2088
- if($appname != "twitter")
2089
- {
2090
  $ch = curl_init(); // Initiate cURL
2091
  curl_setopt($ch, CURLOPT_URL,$access_token_uri);
2092
  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
@@ -2128,8 +2138,7 @@ include "twitter_oauth.php";
2128
  }
2129
 
2130
  }
2131
- else
2132
- {
2133
  $oauth_token_array = explode('&', $oauth_token);
2134
  $oauth_access_token = isset($oauth_token_array[0]) ? $oauth_token_array[0] : null;
2135
  $oauth_access_token = explode('=', $oauth_access_token);
@@ -2159,8 +2168,7 @@ include "twitter_oauth.php";
2159
  }
2160
  }
2161
 
2162
- if($appname != "twitter")
2163
- {
2164
  $churl = curl_init($profile_url);
2165
  curl_setopt( $churl, CURLOPT_FOLLOWLOCATION, true );
2166
  curl_setopt( $churl, CURLOPT_ENCODING, "" );
@@ -2185,8 +2193,7 @@ include "twitter_oauth.php";
2185
 
2186
  }
2187
  //Test Configuration
2188
- if( is_user_logged_in() && get_option('mo_openid_test_configuration') == 1 )
2189
- {
2190
  update_option( 'mo_openid_test_configuration', 0);
2191
  $print = '<div style="color: #3c763d;
2192
  background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>
@@ -2233,6 +2240,14 @@ background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; bord
2233
  $user_picture = isset( $profile_json_output['profile_image_url']) ? $profile_json_output['profile_image_url'] : '';
2234
  $social_user_id = isset( $profile_json_output['id_str']) ? $profile_json_output['id_str'] : '';
2235
  }
 
 
 
 
 
 
 
 
2236
 
2237
  //Set User Full Name
2238
  if(isset( $first_name ) && isset( $last_name )){
@@ -3143,10 +3158,10 @@ background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; bord
3143
  function mo_openid_update_role($user_id='', $user_url=''){
3144
  // save the profile url in user meta // this was added to save facebook url in user meta as it is more than 100 chars
3145
  update_user_meta($user_id, 'moopenid_user_profile_url',$user_url);
3146
- if(get_option('mo_openid_login_role_mapping') ){
3147
- $user = get_user_by('ID',$user_id);
3148
- $user->set_role( get_option('mo_openid_login_role_mapping') );
3149
- }
3150
  }
3151
 
3152
  function mo_openid_get_wp_style(){
1261
  }
1262
  exit;
1263
  }
1264
+
1265
+ else if ((isset($_POST['appname'])) && (isset($_POST['test_configuration']))){
1266
  update_option( 'mo_openid_test_configuration', 1);
1267
  exit;
1268
  }
1269
+
1270
+ else if( isset( $_POST['option'] ) and strpos( $_POST['option'], 'mo_openid_show_profile_form' ) !== false ){
1271
  echo mo_openid_profile_completion_form($_POST["last_name"],$_POST["first_name"], $_POST["user_full_name"],$_POST["user_url"], $_POST["user_picture"], $_POST['username_field'], $_POST['email_field'],$_POST["decrypted_app_name"],$_POST["decrypted_user_id"]);
1272
  exit;
1273
  }
1621
  $decrypted_last_name = isset($_POST['lastName']) ? mo_openid_decrypt_sanitize($_POST['lastName']): '';
1622
  $decrypted_app_name = isset($_POST['appName']) ? mo_openid_decrypt_sanitize($_POST['appName']): '';
1623
  $decrypted_user_id = isset($_POST['userid']) ? mo_openid_decrypt_sanitize($_POST['userid']): '';
1624
+
1625
+
1626
+ $decrypted_user_name = str_replace(' ', '-', $decrypted_user_name);
1627
+ $decrypted_user_name = sanitize_user($decrypted_user_name, true);
1628
+
1629
+ if($decrypted_user_name == '-' || $decrypted_user_name == ''){
1630
+ $splitemail = explode('@', $decrypted_email);
1631
+ $decrypted_user_name = $splitemail[0];
1632
+ }
1633
 
1634
  $decrypted_app_name = mo_openid_filter_app_name($decrypted_app_name);
1635
 
2096
  }
2097
  }
2098
 
2099
+ if($appname != "twitter"){
 
2100
  $ch = curl_init(); // Initiate cURL
2101
  curl_setopt($ch, CURLOPT_URL,$access_token_uri);
2102
  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
2138
  }
2139
 
2140
  }
2141
+ else{
 
2142
  $oauth_token_array = explode('&', $oauth_token);
2143
  $oauth_access_token = isset($oauth_token_array[0]) ? $oauth_token_array[0] : null;
2144
  $oauth_access_token = explode('=', $oauth_access_token);
2168
  }
2169
  }
2170
 
2171
+ if($appname != "twitter"){
 
2172
  $churl = curl_init($profile_url);
2173
  curl_setopt( $churl, CURLOPT_FOLLOWLOCATION, true );
2174
  curl_setopt( $churl, CURLOPT_ENCODING, "" );
2193
 
2194
  }
2195
  //Test Configuration
2196
+ if( is_user_logged_in() && get_option('mo_openid_test_configuration') == 1 ){
 
2197
  update_option( 'mo_openid_test_configuration', 0);
2198
  $print = '<div style="color: #3c763d;
2199
  background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>
2240
  $user_picture = isset( $profile_json_output['profile_image_url']) ? $profile_json_output['profile_image_url'] : '';
2241
  $social_user_id = isset( $profile_json_output['id_str']) ? $profile_json_output['id_str'] : '';
2242
  }
2243
+
2244
+ $user_name = str_replace(' ', '-', $user_name);
2245
+ $user_name = sanitize_user($user_name, true);
2246
+
2247
+ if($user_name == '-' || $user_name == ''){
2248
+ $splitemail = explode('@', $email);
2249
+ $user_name = $splitemail[0];
2250
+ }
2251
 
2252
  //Set User Full Name
2253
  if(isset( $first_name ) && isset( $last_name )){
3158
  function mo_openid_update_role($user_id='', $user_url=''){
3159
  // save the profile url in user meta // this was added to save facebook url in user meta as it is more than 100 chars
3160
  update_user_meta($user_id, 'moopenid_user_profile_url',$user_url);
3161
+ $user = get_user_by('ID',$user_id);
3162
+ if(get_option('mo_openid_login_role_mapping') && !(empty($user)) ){
3163
+ $user->set_role( get_option('mo_openid_login_role_mapping') );
3164
+ }
3165
  }
3166
 
3167
  function mo_openid_get_wp_style(){
class-mo-openid-sso-shortcode-buttons.php CHANGED
@@ -272,10 +272,10 @@ function mo_openid_share_shortcode( $atts = '', $title = '', $excerpt = '' )
272
 
273
  if (wp_is_mobile()) {
274
  $html .= '<a rel="nofollow" title="Whatsapp" href="whatsapp://send?text=' . $url . '" class="mo-openid-share-link" style="margin-left : ' . ($spaceBetweenIcons) . 'px !important; border-bottom:0px !important;">
275
- <img alt="Whatsapp" style= "height: ' . $sharingSize . 'px !important;width: ' . $sharingSize . 'px !important;" src=" ' . plugins_url("includes/images/icons/whatsapp.png", __FILE__) . '" class="mo-openid-app-share-icons ' . $selected_theme . '" ></a>';
276
  } else {
277
  $html .= '<a rel="nofollow" title="Whatsapp" target ="_blank" href="https://web.whatsapp.com/send?text=' . $url . '" class="mo-openid-share-link" style="margin-left : ' . ($spaceBetweenIcons) . 'px !important; border-bottom:0px !important;">
278
- <img alt="Whatsapp" style= "height: ' . $sharingSize . 'px !important;width: ' . $sharingSize . 'px !important;" src=" ' . plugins_url("includes/images/icons/whatsapp.png", __FILE__) . '" class="mo-openid-app-share-icons ' . $selected_theme . '" ></a>';
279
  }
280
 
281
  }
272
 
273
  if (wp_is_mobile()) {
274
  $html .= '<a rel="nofollow" title="Whatsapp" href="whatsapp://send?text=' . $url . '" class="mo-openid-share-link" style="margin-left : ' . ($spaceBetweenIcons) . 'px !important; border-bottom:0px !important;">
275
+ <img alt="Whatsapp" style= "height: ' . $sharingSize . 'px !important;width: ' . $sharingSize . 'px !important;" src="' . plugins_url("includes/images/icons/whatsapp.png", __FILE__) . '" class="mo-openid-app-share-icons ' . $selected_theme . '" ></a>';
276
  } else {
277
  $html .= '<a rel="nofollow" title="Whatsapp" target ="_blank" href="https://web.whatsapp.com/send?text=' . $url . '" class="mo-openid-share-link" style="margin-left : ' . ($spaceBetweenIcons) . 'px !important; border-bottom:0px !important;">
278
+ <img alt="Whatsapp" style= "height: ' . $sharingSize . 'px !important;width: ' . $sharingSize . 'px !important;" src="' . plugins_url("includes/images/icons/whatsapp.png", __FILE__) . '" class="mo-openid-app-share-icons ' . $selected_theme . '" ></a>';
279
  }
280
 
281
  }
miniorange_openid_sso_settings.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Social Login, Social Sharing by miniOrange
4
  * Plugin URI: https://www.miniorange.com/social-login
5
  * Description: Allow your users to login, comment and share with social login apps like Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
6
- * Version: 7.1.5
7
  * Author: social login (miniOrange)
8
  * License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
9
  */
@@ -13,7 +13,7 @@ include_once dirname( __FILE__ ) . '/class-mo-openid-login-widget.php';
13
  require('class-mo-openid-sso-customer.php');
14
  require('class-mo-openid-sso-shortcode-buttons.php');
15
  require('class-mo-openid-social-comment.php');
16
- define('MO_OPENID_SOCIAL_LOGIN_VERSION', '7.1.5');
17
  include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
18
  class Miniorange_OpenID_SSO {
19
 
3
  * Plugin Name: Social Login, Social Sharing by miniOrange
4
  * Plugin URI: https://www.miniorange.com/social-login
5
  * Description: Allow your users to login, comment and share with social login apps like Facebook, Google, Twitter, LinkedIn etc using customizable buttons.
6
+ * Version: 7.1.6
7
  * Author: social login (miniOrange)
8
  * License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
9
  */
13
  require('class-mo-openid-sso-customer.php');
14
  require('class-mo-openid-sso-shortcode-buttons.php');
15
  require('class-mo-openid-social-comment.php');
16
+ define('MO_OPENID_SOCIAL_LOGIN_VERSION', '7.1.6');
17
  include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
18
  class Miniorange_OpenID_SSO {
19
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.miniorange.com
4
  Tags: social login, facebook login, google login, twitter login, Vkontakte login, social, facebook, twitter, google, login, google, social connect, social network login, social plugin, Vkontakte, LinkedIn
5
  Requires at least: 2.0.2
6
  Tested up to: 5.1
7
- Stable tag: 7.1.5
8
  License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
9
 
10
  Social Login with Google, Facebook, Twitter, Vkontakte, LinkedIn and more. GDPR compliant. Social sharing and social comments. Quickest setup.
@@ -175,6 +175,11 @@ Please email us at info@miniorange.com. You can also submit your query from the
175
 
176
 
177
  == Changelog ==
 
 
 
 
 
178
  = 7.1.5 =
179
  * Fixed issue of getting '#_=_' string appended to URL after login with Facebook.
180
  * <a href="https://developers.google.com/+/web/people/" >Google+ APIs </a> will shut down soon, so updated Google OAuth 2 APIs.
@@ -609,6 +614,11 @@ Please email us at info@miniorange.com. You can also submit your query from the
609
  * First version of Social Login, Social Sharing plugin.
610
 
611
  == Upgrade Notice ==
 
 
 
 
 
612
  = 7.1.5 =
613
  * Fixed issue of getting '#_=_' string appended to URL after login with Facebook.
614
  * <a href="https://developers.google.com/+/web/people/" >Google+ APIs </a> will shut down soon, so updated Google OAuth 2 APIs.
4
  Tags: social login, facebook login, google login, twitter login, Vkontakte login, social, facebook, twitter, google, login, google, social connect, social network login, social plugin, Vkontakte, LinkedIn
5
  Requires at least: 2.0.2
6
  Tested up to: 5.1
7
+ Stable tag: 7.1.6
8
  License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
9
 
10
  Social Login with Google, Facebook, Twitter, Vkontakte, LinkedIn and more. GDPR compliant. Social sharing and social comments. Quickest setup.
175
 
176
 
177
  == Changelog ==
178
+ = 7.1.6 =
179
+ * Fixed Non-English Character issue in the username.
180
+ * Fixed the role mapping error message while login.
181
+ * Fixed Whatsapp Sharing image issue.
182
+
183
  = 7.1.5 =
184
  * Fixed issue of getting '#_=_' string appended to URL after login with Facebook.
185
  * <a href="https://developers.google.com/+/web/people/" >Google+ APIs </a> will shut down soon, so updated Google OAuth 2 APIs.
614
  * First version of Social Login, Social Sharing plugin.
615
 
616
  == Upgrade Notice ==
617
+ = 7.1.6 =
618
+ * Fixed Non-English Character issue in the username.
619
+ * Fixed the role mapping error message while login.
620
+ * Fixed Whatsapp Sharing image issue.
621
+
622
  = 7.1.5 =
623
  * Fixed issue of getting '#_=_' string appended to URL after login with Facebook.
624
  * <a href="https://developers.google.com/+/web/people/" >Google+ APIs </a> will shut down soon, so updated Google OAuth 2 APIs.