Social Login - Version 7.2.5

Version Description

  • Fixed Profile completion form issue.
  • Minor UI fixes.
  • Added Add-on UI.
Download this release

Release Info

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

Code changes from version 7.2.4 to 7.2.5

class-mo-openid-login-widget.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
  include "class-mo-openid-twitter-oauth.php";
3
  include "class-mo-openid-social-login-functions.php";
 
4
 
5
  /*
6
  * Login Widget
@@ -1192,6 +1193,60 @@ include "class-mo-openid-social-login-functions.php";
1192
  session_unset(); //unsets all session variables
1193
  }
1194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1195
  function encrypt_data($data, $key) {
1196
  return base64_encode(openssl_encrypt($data, 'aes-128-ecb', $key, OPENSSL_RAW_DATA));
1197
  }
@@ -1296,6 +1351,85 @@ include "class-mo-openid-social-login-functions.php";
1296
  }
1297
  }
1298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1299
  else if( isset($_POST['mo_openid_profile_form_submitted_nonce']) and isset( $_POST['username_field']) and isset($_POST['email_field']) and $_POST['option'] == 'mo_openid_profile_form_submitted' ){
1300
  $nonce = $_POST['mo_openid_profile_form_submitted_nonce'];
1301
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-profile-form-submitted-nonce' ) ) {
@@ -1486,76 +1620,19 @@ include "class-mo-openid-social-login-functions.php";
1486
  return $html;
1487
  }
1488
 
1489
- function mo_openid_username_already_exists($last_name,$first_name,$user_full_name,$user_url,$user_picture,$username,$user_email, $decrypted_app_name, $decrypted_user_id){
1490
- $path = mo_openid_get_wp_style();
1491
- $nonce = wp_create_nonce( 'mo-openid-user-profile-form-submitted-nonce' );
1492
- $html = '<style>.form-input-validation.is-error {color: #d94f4f;}</style>
1493
- <style>
1494
- .mocomp {
1495
- margin: auto !important;
1496
- }
1497
- @media only screen and (max-width: 600px) {
1498
- .mocomp {width: 90%;}
1499
- }
1500
- @media only screen and (min-width: 600px) {
1501
- .mocomp {width: 500px;}
1502
- }
1503
- </style>
1504
-
1505
-
1506
- <head>
1507
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
1508
- <link rel="stylesheet" href='.$path.' type="text/css" media="all" /></head>
1509
-
1510
- <body class="login login-action-login wp-core-ui locale-en-us">
1511
- <div style="position:fixed;background:#f1f1f1;"></div>
1512
- <div id="add_field" style="position:fixed;top: 0;right: 0;bottom: 0;left: 0;z-index: 1;padding-top:130px;">
1513
- <div class="mocomp">
1514
- <form name="f" method="post" action="">
1515
- <div style="background: white;margin-top:-15px;padding: 15px;">
1516
-
1517
- <div style="text-align:center"><span style="font-size: 24px;font-family: Arial">'.esc_html(get_option('mo_profile_complete_title')).'</span></div>
1518
- <p><br>
1519
- <label for="user_login">'.esc_html(get_option('mo_profile_complete_username_label')).'<br/>
1520
- <input type="text" class="input" name="username_field" value='.esc_attr($username).' size="20" required>
1521
- <span align="center" class="form-input-validation is-error">'.esc_html(get_option('mo_profile_complete_uname_exist')).'</span>
1522
- </label>
1523
- </p>
1524
- <br>
1525
- <p>
1526
- <label for="user_pass">'.get_option('mo_profile_complete_email_label').'<br/>
1527
- <input type="email" name="email_field" class="input" value='.$user_email.' size="20" required></label>
1528
- </p>
1529
- <input type="hidden" name="first_name" value='.esc_attr($first_name).'>
1530
- <input type="hidden" name="last_name" value='.esc_attr($last_name).'>
1531
- <input type="hidden" name="user_full_name" value='.esc_attr($user_full_name).'>
1532
- <input type="hidden" name="user_url" value='.esc_url($user_url).'>
1533
- <input type="hidden" name="user_picture" value='.esc_url($user_picture).'>
1534
- <input type="hidden" name="decrypted_app_name" value='.esc_attr($decrypted_app_name).'>
1535
- <input type="hidden" name="decrypted_user_id" value='.esc_attr($decrypted_user_id).'>
1536
- <input type="hidden" name="option" value="mo_openid_profile_form_submitted">
1537
- <input type="hidden" name="mo_openid_user_profile_form_submitted_nonce" value="'.$nonce.'"/>
1538
- </div>
1539
- <p class="submit">
1540
- <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="'.get_option('mo_profile_complete_submit_button').'"/>
1541
- </p> ';
1542
-
1543
- if(get_option('mo_openid_oauth')=='1' && get_option('moopenid_logo_check') == 1) {
1544
- $html .= mo_openid_customize_logo();
1545
- }
1546
-
1547
- $html.= '</form>
1548
- </div>
1549
- </div>
1550
- </body>';
1551
- return $html;
1552
-
1553
  }
1554
-
1555
- function mo_openid_profile_completion_form($last_name,$first_name,$user_full_name,$user_url,$user_picture, $decrypted_user_name, $decrypted_email, $decrypted_app_name, $decrypted_user_id){
1556
- $path = mo_openid_get_wp_style();
1557
- $nonce = wp_create_nonce( 'mo-openid-profile-form-submitted-nonce' );
1558
- $html = '<style>.form-input-validation.note {color: #d94f4f;}</style>
 
1559
  <style>
1560
  .mocomp {
1561
  margin: auto !important;
@@ -1579,9 +1656,9 @@ include "class-mo-openid-social-login-functions.php";
1579
  <div style="background: white;margin-top:-15px;padding: 15px;">
1580
 
1581
  <div style="text-align:center"><span style="font-size: 24px;font-family: Arial">'.esc_html(get_option('mo_profile_complete_title')).'</span></div><br>
1582
- <div style="padding: 12px;"></div>
1583
  <div style=" padding: 16px;background-color:rgba(1, 145, 191, 0.117647);color: black;">
1584
- <span style=" margin-left: 15px;color: black;font-weight: bold;float: right;font-size: 22px;line-height: 20px;cursor: pointer;font-family: Arial;transition: 0.3s"></span>'.esc_html(get_option('mo_profile_complete_instruction')).'</div><br>
1585
  <p>
1586
  <label for="user_login">'.esc_html(get_option('mo_profile_complete_username_label')).'<br/>
1587
  <input type="text" class="input" name="username_field" size="20" required value='.esc_attr($decrypted_user_name).'></label>
@@ -1589,7 +1666,7 @@ include "class-mo-openid-social-login-functions.php";
1589
  <p>
1590
  <label for="user_pass">'.esc_html(get_option('mo_profile_complete_email_label')).'<br/>
1591
  <input type="email" class="input" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]+$" name="email_field" size="20" required value='.esc_attr($decrypted_email).'></label>
1592
- <span align="center" class="form-input-validation note">'.esc_html(get_option('mo_profile_complete_extra_instruction')).'</span>
1593
  </p>
1594
  <input type="hidden" name="first_name" value='.esc_attr($first_name).'>
1595
  <input type="hidden" name="last_name" value='.esc_attr($last_name).'>
@@ -1605,18 +1682,18 @@ include "class-mo-openid-social-login-functions.php";
1605
  <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="'.get_option('mo_profile_complete_submit_button').'"/>
1606
  </p> ';
1607
 
1608
- if(get_option('mo_openid_oauth')=='1' && get_option('moopenid_logo_check') == 1) {
1609
- $html .= mo_openid_customize_logo();
1610
- }
1611
 
1612
- $html.= '</form>
1613
  </div>
1614
  </div>
1615
  </body>';
1616
- return $html;
1617
- }
1618
 
1619
- function mo_openid_account_linking_form($username,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$decrypted_app_name,$decrypted_user_id){
1620
  $path = mo_openid_get_wp_style();
1621
  $nonce = wp_create_nonce( 'mo-openid-account-linking-nonce' );
1622
  $html = "
1
  <?php
2
  include "class-mo-openid-twitter-oauth.php";
3
  include "class-mo-openid-social-login-functions.php";
4
+ include_once dirname(__FILE__) . '/miniorange_openid_sso_encryption.php';
5
 
6
  /*
7
  * Login Widget
1193
  session_unset(); //unsets all session variables
1194
  }
1195
 
1196
+ function update_custom_data($user_id)
1197
+ {
1198
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
1199
+ foreach ($set_cust_field as $x) {
1200
+ $count = 0;
1201
+ $a = 1;
1202
+ $res = "";
1203
+ foreach ($x as $xx => $x_value) {
1204
+ if ($count == 0)
1205
+ $predefine = $x_value;
1206
+ elseif ($count == 1)
1207
+ $opt_val = $x_value;
1208
+ elseif ($count == 2)
1209
+ $field = $x_value;
1210
+ elseif ($count == 3)
1211
+ $type = $x_value;
1212
+ elseif ($count == 4)
1213
+ $add_field = $x_value;
1214
+ $count++;
1215
+ }
1216
+
1217
+ if ($opt_val === "other") {
1218
+ if ($predefine != "")
1219
+ $field_update = $predefine;
1220
+ else
1221
+ $field_update = $field;
1222
+ } else {
1223
+ if ($predefine != "") {
1224
+ $field_update = $predefine;
1225
+ $field = $predefine;
1226
+ } else {
1227
+ $field_update = $opt_val;
1228
+ $field = $opt_val . "_update";
1229
+ }
1230
+ }
1231
+ if ($type != "checkbox") {
1232
+ update_user_meta($user_id, $field_update, $_POST[$field]);
1233
+ } else {
1234
+ $flag = 0;
1235
+ $str_res = explode(";", $add_field);
1236
+ foreach ($str_res as $value_genetared) {
1237
+ if (isset($_POST[$field . $a])) {
1238
+ if ($flag != 0)
1239
+ $res = $res . ";";
1240
+ $res = $res . $_POST[$field . $a];
1241
+ $flag++;
1242
+ }
1243
+ $a++;
1244
+ }
1245
+ update_user_meta($user_id, $field_update, $res);
1246
+ }
1247
+ }
1248
+ }
1249
+
1250
  function encrypt_data($data, $key) {
1251
  return base64_encode(openssl_encrypt($data, 'aes-128-ecb', $key, OPENSSL_RAW_DATA));
1252
  }
1351
  }
1352
  }
1353
 
1354
+ else if ( isset($_POST['mo_openid_custom_form_submitted_nonce']) and isset($_POST['username']) and $_POST['option'] == 'mo_openid_custom_form_submitted' ){
1355
+ $nonce = $_POST['mo_openid_custom_form_submitted_nonce'];
1356
+ if ( ! wp_verify_nonce( $nonce, 'mo-openid-custom-form-submitted-nonce' ) ) {
1357
+ wp_die('<strong>ERROR</strong>: Invalid Request.' . $nonce);
1358
+ } else {
1359
+ $curr_user=get_current_user_id();
1360
+ if($curr_user!=0) {
1361
+ update_custom_data($curr_user);
1362
+ header("Location:".get_option('profile_completion_page'));
1363
+ exit;
1364
+ }
1365
+ $user_picture = $_POST["user_picture"];
1366
+ $user_url = $_POST["user_url"];
1367
+ $last_name = $_POST["last_name"];
1368
+ $username=$_POST["username"];
1369
+ $user_email=$_POST["user_email"];
1370
+ $random_password=$_POST["random_password"];
1371
+ $user_full_name = $_POST["user_full_name"];
1372
+ $first_name = $_POST["first_name"];
1373
+ $decrypted_app_name = $_POST["decrypted_app_name"];
1374
+ $decrypted_user_id = $_POST["decrypted_user_id"];
1375
+ $call = $_POST["call"];
1376
+ $user_profile_url = $_POST["user_profile_url"];
1377
+ $social_app_name = $_POST["social_app_name"];
1378
+ $social_user_id = $_POST["social_user_id"];
1379
+
1380
+ $userdata = array(
1381
+ 'user_login' => $username,
1382
+ 'user_email' => $user_email,
1383
+ 'user_pass' => $random_password,
1384
+ 'display_name' => $user_full_name,
1385
+ 'first_name' => $first_name,
1386
+ 'last_name' => $last_name,
1387
+ 'user_url' => $user_url,
1388
+ );
1389
+ do_action("mo_before_insert_user",$call);
1390
+ $user_id = wp_insert_user( $userdata);
1391
+ if(is_wp_error( $user_id )) {
1392
+ print_r($user_id);
1393
+ wp_die("Error Code ".$call.": ".get_option('mo_registration_error_message'));
1394
+ }
1395
+ if($call==1 | $call==3 | $call==5)
1396
+ update_option('mo_openid_user_count',get_option('mo_openid_user_count')+1);
1397
+ if($call==1) {
1398
+ mo_openid_start_session();
1399
+ }
1400
+ if($call==2 | $call==3 | $call==4) {
1401
+ $_SESSION['social_app_name'] = $decrypted_app_name;
1402
+ $_SESSION['user_email'] = $user_email;
1403
+ $_SESSION['social_user_id'] = $decrypted_user_id;
1404
+ }
1405
+ if($call==5 | $call==6) {
1406
+ mo_openid_start_session();
1407
+ $_SESSION['username'] = $username;
1408
+ $_SESSION['user_email'] = $user_email;
1409
+ $_SESSION['user_full_name'] = $user_full_name;
1410
+ $_SESSION['first_name'] = $first_name;
1411
+ $_SESSION['last_name'] = $last_name;
1412
+ $_SESSION['user_url'] = $user_url;
1413
+ $_SESSION['user_picture'] = $user_picture;
1414
+ $_SESSION['social_app_name'] = $social_app_name;
1415
+ $_SESSION['social_user_id'] = $social_user_id;
1416
+ }
1417
+ $user = get_user_by('id', $user_id );
1418
+ update_custom_data($user_id);
1419
+ if(get_option('moopenid_social_login_avatar') && isset($user_picture)){
1420
+ update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
1421
+ }
1422
+ $_SESSION['mo_login'] = true;
1423
+ do_action( 'mo_user_register', $user_id,$user_profile_url);
1424
+ do_action( 'miniorange_collect_attributes_for_authenticated_user', $user, mo_openid_get_redirect_url());
1425
+ do_action( 'wp_login', $user->user_login, $user );
1426
+ wp_set_auth_cookie( $user_id, true );
1427
+ $redirect_url = mo_openid_get_redirect_url();
1428
+ wp_redirect($redirect_url);
1429
+ exit;
1430
+ }
1431
+ }
1432
+
1433
  else if( isset($_POST['mo_openid_profile_form_submitted_nonce']) and isset( $_POST['username_field']) and isset($_POST['email_field']) and $_POST['option'] == 'mo_openid_profile_form_submitted' ){
1434
  $nonce = $_POST['mo_openid_profile_form_submitted_nonce'];
1435
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-profile-form-submitted-nonce' ) ) {
1620
  return $html;
1621
  }
1622
 
1623
+ function mo_openid_profile_completion_form($last_name,$first_name,$user_full_name,$user_url,$user_picture, $decrypted_user_name, $decrypted_email, $decrypted_app_name, $decrypted_user_id,$existing_uname='1'){
1624
+ $path = mo_openid_get_wp_style();
1625
+ if($existing_uname=='1')
1626
+ {
1627
+ $instruction_msg=esc_html(get_option('mo_profile_complete_instruction'));
1628
+ $extra_instruction=esc_html(get_option('mo_profile_complete_extra_instruction'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1629
  }
1630
+ else{
1631
+ $instruction_msg=esc_html(get_option('mo_profile_complete_uname_exist'));
1632
+ $extra_instruction="";
1633
+ }
1634
+ $nonce = wp_create_nonce( 'mo-openid-profile-form-submitted-nonce' );
1635
+ $html = '<style>.form-input-validation.note {color: #d94f4f;}</style>
1636
  <style>
1637
  .mocomp {
1638
  margin: auto !important;
1656
  <div style="background: white;margin-top:-15px;padding: 15px;">
1657
 
1658
  <div style="text-align:center"><span style="font-size: 24px;font-family: Arial">'.esc_html(get_option('mo_profile_complete_title')).'</span></div><br>
1659
+ <div style="padding: 12px;"></div>
1660
  <div style=" padding: 16px;background-color:rgba(1, 145, 191, 0.117647);color: black;">
1661
+ <span style=" margin-left: 15px;color: black;font-weight: bold;float: right;font-size: 22px;line-height: 20px;cursor: pointer;font-family: Arial;transition: 0.3s"></span>'.$instruction_msg.'</div><br>
1662
  <p>
1663
  <label for="user_login">'.esc_html(get_option('mo_profile_complete_username_label')).'<br/>
1664
  <input type="text" class="input" name="username_field" size="20" required value='.esc_attr($decrypted_user_name).'></label>
1666
  <p>
1667
  <label for="user_pass">'.esc_html(get_option('mo_profile_complete_email_label')).'<br/>
1668
  <input type="email" class="input" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]+$" name="email_field" size="20" required value='.esc_attr($decrypted_email).'></label>
1669
+ <span align="center" class="form-input-validation note">'.$extra_instruction.'</span>
1670
  </p>
1671
  <input type="hidden" name="first_name" value='.esc_attr($first_name).'>
1672
  <input type="hidden" name="last_name" value='.esc_attr($last_name).'>
1682
  <input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="'.get_option('mo_profile_complete_submit_button').'"/>
1683
  </p> ';
1684
 
1685
+ if(get_option('mo_openid_oauth')=='1' && get_option('moopenid_logo_check') == 1) {
1686
+ $html .= mo_openid_customize_logo();
1687
+ }
1688
 
1689
+ $html.= '</form>
1690
  </div>
1691
  </div>
1692
  </body>';
1693
+ return $html;
1694
+ }
1695
 
1696
+ function mo_openid_account_linking_form($username,$user_email,$first_name,$last_name,$user_full_name,$user_url,$user_picture,$decrypted_app_name,$decrypted_user_id){
1697
  $path = mo_openid_get_wp_style();
1698
  $nonce = wp_create_nonce( 'mo-openid-account-linking-nonce' );
1699
  $html = "
class-mo-openid-social-login-functions.php CHANGED
@@ -49,6 +49,63 @@ function mo_openid_process_account_linking($username, $user_email, $first_name,
49
  $user_url = '';
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  $userdata = array(
53
  'user_login' => $username,
54
  'user_email' => $user_email,
@@ -59,6 +116,7 @@ function mo_openid_process_account_linking($username, $user_email, $first_name,
59
  'user_url' => $user_url,
60
  );
61
 
 
62
  $user_id = wp_insert_user( $userdata);
63
 
64
  if(is_wp_error( $user_id )) {
@@ -148,7 +206,7 @@ function mo_openid_save_profile_completion_form($username, $user_email, $first_n
148
  else {
149
 
150
  if( isset($username_user_id) ){
151
- echo mo_openid_username_already_exists($last_name, $first_name, $user_full_name, $user_url, $user_picture, $username, $user_email, $decrypted_app_name, $decrypted_user_id);
152
  exit;
153
  }
154
  else {
@@ -245,6 +303,66 @@ function mo_openid_social_login_validate_otp($username, $user_email, $first_name
245
  $user_url = '';
246
  }
247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  $userdata = array(
249
  'user_login' => $username,
250
  'user_email' => $user_email,
@@ -255,6 +373,7 @@ function mo_openid_social_login_validate_otp($username, $user_email, $first_name
255
  'user_url' => $user_url,
256
  );
257
 
 
258
  $user_id = wp_insert_user( $userdata);
259
 
260
  if(is_wp_error( $user_id )) {
@@ -416,6 +535,66 @@ function mo_openid_process_social_login(){
416
  $user_url = '';
417
  }
418
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  $userdata = array(
420
  'user_login' => $username,
421
  'user_email' => $user_email,
@@ -426,6 +605,7 @@ function mo_openid_process_social_login(){
426
  'user_url' => $user_url,
427
  );
428
 
 
429
  $user_id = wp_insert_user( $userdata);
430
  if(is_wp_error( $user_id )) {
431
  print_r($user_id);
@@ -557,6 +737,66 @@ function mo_openid_process_social_login(){
557
  $user_url = '';
558
  }
559
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  $userdata = array(
561
  'user_login' => $username,
562
  'user_email' => $user_email,
@@ -567,7 +807,7 @@ function mo_openid_process_social_login(){
567
  'user_url' => $user_url
568
  );
569
 
570
-
571
  $user_id = wp_insert_user( $userdata);
572
 
573
  if(is_wp_error( $user_id )) {
@@ -999,6 +1239,66 @@ background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; bord
999
  $user_url = '';
1000
  }
1001
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1002
  $userdata = array(
1003
  'user_login' => $username,
1004
  'user_email' => $user_email,
@@ -1008,7 +1308,7 @@ background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; bord
1008
  'last_name' => $last_name,
1009
  'user_url' => $user_url,
1010
  );
1011
-
1012
  $user_id = wp_insert_user( $userdata);
1013
 
1014
  if(is_wp_error( $user_id )) {
@@ -1144,6 +1444,66 @@ background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; bord
1144
  $user_url = '';
1145
  }
1146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1147
  $userdata = array(
1148
  'user_login' => $username,
1149
  'user_email' => $user_email,
@@ -1154,6 +1514,7 @@ background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; bord
1154
  'user_url' => $user_url,
1155
  );
1156
 
 
1157
  $user_id = wp_insert_user( $userdata);
1158
  if(is_wp_error( $user_id )) {
1159
  print_r($user_id);
49
  $user_url = '';
50
  }
51
 
52
+ // Checking if username already exist
53
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
54
+ if( isset($username_user_id) ){
55
+ $email_array = explode('@', $user_email);
56
+ $username = $email_array[0];
57
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
58
+ $i = 1;
59
+ while(!empty($username_user_id) ){
60
+ $uname=$username.'_' . $i;
61
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
62
+ $i++;
63
+ if(empty($username_user_id)){
64
+ $username= $uname;
65
+ }
66
+ }
67
+ if( isset($username_user_id) ){
68
+ echo '<br/>'."Error Code 1: ".get_option('mo_existing_username_error_message');
69
+ exit();
70
+ }
71
+ }
72
+
73
+ //to check for customisation fields
74
+ if(get_option('mo_openid_customised_field_enable') == 1 ) {
75
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
76
+ if ($set_cust_field) {
77
+ foreach ($set_cust_field as $x) {
78
+ foreach ($x as $xx => $x_value) {
79
+ if (isset($xx)) {
80
+ ?>
81
+ <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
82
+ <?php
83
+ echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
84
+ echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
85
+ echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
86
+ echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
87
+ echo '<input type="hidden" name="call" value="1">';
88
+ echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
89
+ echo '<input type="hidden" name="username" value="' . $username . '">';
90
+ echo '<input type="hidden" name="user_email" value="' . $user_email . '">';
91
+ echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
92
+ echo '<input type="hidden" name="social_app_name" value="">';
93
+ echo '<input type="hidden" name="social_user_id" value="">';
94
+ echo '<input type="hidden" name="decrypted_app_name" value="' . $decrypted_app_name . '">';
95
+ echo '<input type="hidden" name="decrypted_user_id" value="' . $decrypted_user_id . '">';
96
+ ?>
97
+ </form>
98
+ <script type="text/javascript">
99
+ document.getElementById('myForm').submit();
100
+ </script>
101
+ <?php
102
+ exit;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
  $userdata = array(
110
  'user_login' => $username,
111
  'user_email' => $user_email,
116
  'user_url' => $user_url,
117
  );
118
 
119
+ do_action("mo_before_insert_user",$userdata,"1");
120
  $user_id = wp_insert_user( $userdata);
121
 
122
  if(is_wp_error( $user_id )) {
206
  else {
207
 
208
  if( isset($username_user_id) ){
209
+ echo mo_openid_profile_completion_form($last_name, $first_name, $user_full_name, $user_url, $user_picture, $username, $user_email, $decrypted_app_name, $decrypted_user_id,'0');
210
  exit;
211
  }
212
  else {
303
  $user_url = '';
304
  }
305
 
306
+ // Checking if username already exist
307
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
308
+
309
+ if( isset($username_user_id) ){
310
+ $email_array = explode('@', $user_email);
311
+ $username = $email_array[0];
312
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
313
+ $i = 1;
314
+ while(!empty($username_user_id) ){
315
+ $uname=$username.'_' . $i;
316
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
317
+ $i++;
318
+ if(empty($username_user_id)){
319
+ $username= $uname;
320
+ }
321
+ }
322
+
323
+ if( isset($username_user_id) ){
324
+ echo '<br/>'."Error Code 2: ".get_option('mo_existing_username_error_message');
325
+ exit();
326
+ }
327
+ }
328
+
329
+ //to check for customisation fields
330
+ if(get_option('mo_openid_customised_field_enable') == 1 ) {
331
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
332
+ if ($set_cust_field) {
333
+ foreach ($set_cust_field as $x) {
334
+ foreach ($x as $xx => $x_value) {
335
+ if (isset($xx)) {
336
+ ?>
337
+ <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
338
+ <?php
339
+ echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
340
+ echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
341
+ echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
342
+ echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
343
+ echo '<input type="hidden" name="user_profile_url" value="' . $user_profile_url . '">';
344
+ echo '<input type="hidden" name="call" value="2">';
345
+ echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
346
+ echo '<input type="hidden" name="username" value="' . $username . '">';
347
+ echo '<input type="hidden" name="user_email" value="' . $user_email . '">';
348
+ echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
349
+ echo '<input type="hidden" name="social_app_name" value="">';
350
+ echo '<input type="hidden" name="social_user_id" value="">';
351
+ echo '<input type="hidden" name="decrypted_app_name" value="' . $decrypted_app_name . '">';
352
+ echo '<input type="hidden" name="decrypted_user_id" value="' . $decrypted_user_id . '">';
353
+ ?>
354
+ </form>
355
+ <script type="text/javascript">
356
+ document.getElementById('myForm').submit();
357
+ </script>
358
+ <?php
359
+ exit;
360
+ }
361
+ }
362
+ }
363
+ }
364
+ }
365
+
366
  $userdata = array(
367
  'user_login' => $username,
368
  'user_email' => $user_email,
373
  'user_url' => $user_url,
374
  );
375
 
376
+ do_action("mo_before_insert_user",$userdata,"2");
377
  $user_id = wp_insert_user( $userdata);
378
 
379
  if(is_wp_error( $user_id )) {
535
  $user_url = '';
536
  }
537
 
538
+ // Checking if username already exist
539
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
540
+
541
+ if( isset($username_user_id) ){
542
+ $email_array = explode('@', $user_email);
543
+ $username = $email_array[0];
544
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
545
+ $i = 1;
546
+ while(!empty($username_user_id) ){
547
+ $uname=$username.'_' . $i;
548
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
549
+ $i++;
550
+ if(empty($username_user_id)){
551
+ $username= $uname;
552
+ }
553
+ }
554
+
555
+ if( isset($username_user_id) ){
556
+ echo '<br/>'."Error Code 3: ".get_option('mo_existing_username_error_message');
557
+ exit();
558
+ }
559
+ }
560
+
561
+ //to check for customisation fields
562
+ if(get_option('mo_openid_customised_field_enable') == 1 ) {
563
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
564
+ if ($set_cust_field) {
565
+ foreach ($set_cust_field as $x) {
566
+ foreach ($x as $xx => $x_value) {
567
+ if (isset($xx)) {
568
+ ?>
569
+ <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
570
+ <?php
571
+ echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
572
+ echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
573
+ echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
574
+ echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
575
+ echo '<input type="hidden" name="user_profile_url" value="' . $user_profile_url . '">';
576
+ echo '<input type="hidden" name="call" value="3">';
577
+ echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
578
+ echo '<input type="hidden" name="username" value="' . $username . '">';
579
+ echo '<input type="hidden" name="user_email" value="' . $user_email . '">';
580
+ echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
581
+ echo '<input type="hidden" name="social_app_name" value="">';
582
+ echo '<input type="hidden" name="social_user_id" value="">';
583
+ echo '<input type="hidden" name="decrypted_app_name" value="' . $decrypted_app_name . '">';
584
+ echo '<input type="hidden" name="decrypted_user_id" value="' . $decrypted_user_id . '">';
585
+ ?>
586
+ </form>
587
+ <script type="text/javascript">
588
+ document.getElementById('myForm').submit();
589
+ </script>
590
+ <?php
591
+ exit;
592
+ }
593
+ }
594
+ }
595
+ }
596
+ }
597
+
598
  $userdata = array(
599
  'user_login' => $username,
600
  'user_email' => $user_email,
605
  'user_url' => $user_url,
606
  );
607
 
608
+ do_action("mo_before_insert_user",$userdata,"3");
609
  $user_id = wp_insert_user( $userdata);
610
  if(is_wp_error( $user_id )) {
611
  print_r($user_id);
737
  $user_url = '';
738
  }
739
 
740
+ // Checking if username already exist
741
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
742
+
743
+ if( isset($username_user_id) ){
744
+ $email_array = explode('@', $user_email);
745
+ $username = $email_array[0];
746
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
747
+ $i = 1;
748
+ while(!empty($username_user_id) ){
749
+ $uname=$username.'_' . $i;
750
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
751
+ $i++;
752
+ if(empty($username_user_id)){
753
+ $username= $uname;
754
+ }
755
+ }
756
+
757
+ if( isset($username_user_id) ){
758
+ echo '<br/>'."Error Code 4: ".get_option('mo_existing_username_error_message');
759
+ exit();
760
+ }
761
+ }
762
+
763
+ //to check for customisation fields
764
+ if(get_option('mo_openid_customised_field_enable') == 1 ) {
765
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
766
+ if ($set_cust_field) {
767
+ foreach ($set_cust_field as $x) {
768
+ foreach ($x as $xx => $x_value) {
769
+ if (isset($xx)) {
770
+ ?>
771
+ <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
772
+ <?php
773
+ echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
774
+ echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
775
+ echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
776
+ echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
777
+ echo '<input type="hidden" name="user_profile_url" value="' . $user_profile_url . '">';
778
+ echo '<input type="hidden" name="call" value="4">';
779
+ echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
780
+ echo '<input type="hidden" name="username" value="' . $username . '">';
781
+ echo '<input type="hidden" name="user_email" value="' . $user_email . '">';
782
+ echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
783
+ echo '<input type="hidden" name="social_app_name" value="">';
784
+ echo '<input type="hidden" name="social_user_id" value="">';
785
+ echo '<input type="hidden" name="decrypted_app_name" value="' . $decrypted_app_name . '">';
786
+ echo '<input type="hidden" name="decrypted_user_id" value="' . $decrypted_user_id . '">';
787
+ ?>
788
+ </form>
789
+ <script type="text/javascript">
790
+ document.getElementById('myForm').submit();
791
+ </script>
792
+ <?php
793
+ exit;
794
+ }
795
+ }
796
+ }
797
+ }
798
+ }
799
+
800
  $userdata = array(
801
  'user_login' => $username,
802
  'user_email' => $user_email,
807
  'user_url' => $user_url
808
  );
809
 
810
+ do_action("mo_before_insert_user",$userdata,"4");
811
  $user_id = wp_insert_user( $userdata);
812
 
813
  if(is_wp_error( $user_id )) {
1239
  $user_url = '';
1240
  }
1241
 
1242
+ // Checking if username already exist
1243
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
1244
+
1245
+ if( isset($username_user_id) ){
1246
+ $email_array = explode('@', $user_email);
1247
+ $username = $email_array[0];
1248
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
1249
+ $i = 1;
1250
+ while(!empty($username_user_id) ){
1251
+ $uname=$username.'_' . $i;
1252
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
1253
+ $i++;
1254
+ if(empty($username_user_id)){
1255
+ $username= $uname;
1256
+ }
1257
+ }
1258
+
1259
+ if( isset($username_user_id) ){
1260
+ echo '<br/>'."Error Code 5: ".get_option('mo_existing_username_error_message');
1261
+ exit();
1262
+ }
1263
+ }
1264
+
1265
+ //to check for customisation fields
1266
+ if(get_option('mo_openid_customised_field_enable') == 1 ) {
1267
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
1268
+ if ($set_cust_field) {
1269
+ foreach ($set_cust_field as $x) {
1270
+ foreach ($x as $xx => $x_value) {
1271
+ if (isset($xx)) {
1272
+ ?>
1273
+ <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
1274
+ <?php
1275
+ echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
1276
+ echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
1277
+ echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
1278
+ echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
1279
+ echo '<input type="hidden" name="user_profile_url" value="' . $user_profile_url . '">';
1280
+ echo '<input type="hidden" name="call" value="5">';
1281
+ echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
1282
+ echo '<input type="hidden" name="username" value="' . $username . '">';
1283
+ echo '<input type="hidden" name="user_email" value="' . $user_email . '">';
1284
+ echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
1285
+ echo '<input type="hidden" name="social_app_name" value="' . $social_app_name . '">';
1286
+ echo '<input type="hidden" name="social_user_id" value="' . $social_user_id . '">';
1287
+ echo '<input type="hidden" name="decrypted_app_name" value="">';
1288
+ echo '<input type="hidden" name="decrypted_user_id" value="">';
1289
+ ?>
1290
+ </form>
1291
+ <script type="text/javascript">
1292
+ document.getElementById('myForm').submit();
1293
+ </script>
1294
+ <?php
1295
+ exit;
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+
1302
  $userdata = array(
1303
  'user_login' => $username,
1304
  'user_email' => $user_email,
1308
  'last_name' => $last_name,
1309
  'user_url' => $user_url,
1310
  );
1311
+ do_action("mo_before_insert_user",$userdata,"5");
1312
  $user_id = wp_insert_user( $userdata);
1313
 
1314
  if(is_wp_error( $user_id )) {
1444
  $user_url = '';
1445
  }
1446
 
1447
+ // Checking if username already exist
1448
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
1449
+
1450
+ if( isset($username_user_id) ){
1451
+ $email_array = explode('@', $user_email);
1452
+ $username = $email_array[0];
1453
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->users where user_login = %s", $username));
1454
+ $i = 1;
1455
+ while(!empty($username_user_id) ){
1456
+ $uname=$username.'_' . $i;
1457
+ $username_user_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM " .$db_prefix."users where user_login = %s", $uname));
1458
+ $i++;
1459
+ if(empty($username_user_id)){
1460
+ $username= $uname;
1461
+ }
1462
+ }
1463
+
1464
+ if( isset($username_user_id) ){
1465
+ echo '<br/>'."Error Code 6: ".get_option('mo_existing_username_error_message');
1466
+ exit();
1467
+ }
1468
+ }
1469
+
1470
+ //to check for customisation fields
1471
+ if(get_option('mo_openid_customised_field_enable') == 1 ) {
1472
+ $set_cust_field = get_option('mo_openid_custom_field_mapping');
1473
+ if ($set_cust_field) {
1474
+ foreach ($set_cust_field as $x) {
1475
+ foreach ($x as $xx => $x_value) {
1476
+ if (isset($xx)) {
1477
+ ?>
1478
+ <form id="myForm" action="<?php echo get_option('profile_completion_page') ?>" method="post">
1479
+ <?php
1480
+ echo '<input type="hidden" name="last_name" value="' . $last_name . '">';
1481
+ echo '<input type="hidden" name="first_name" value="' . $first_name . '">';
1482
+ echo '<input type="hidden" name="user_full_name" value="' . $user_full_name . '">';
1483
+ echo '<input type="hidden" name="user_url" value="' . $user_url . '">';
1484
+ echo '<input type="hidden" name="user_profile_url" value="' . $user_profile_url . '">';
1485
+ echo '<input type="hidden" name="call" value="6">';
1486
+ echo '<input type="hidden" name="user_picture" value="'.$user_picture.'">';
1487
+ echo '<input type="hidden" name="username" value="' . $username . '">';
1488
+ echo '<input type="hidden" name="user_email" value="' . $user_email . '">';
1489
+ echo '<input type="hidden" name="random_password" value="' . $random_password . '">';
1490
+ echo '<input type="hidden" name="social_app_name" value="' . $social_app_name . '">';
1491
+ echo '<input type="hidden" name="social_user_id" value="' . $social_user_id . '">';
1492
+ echo '<input type="hidden" name="decrypted_app_name" value="">';
1493
+ echo '<input type="hidden" name="decrypted_user_id" value="">';
1494
+ ?>
1495
+ </form>
1496
+ <script type="text/javascript">
1497
+ document.getElementById('myForm').submit();
1498
+ </script>
1499
+ <?php
1500
+ exit;
1501
+ }
1502
+ }
1503
+ }
1504
+ }
1505
+ }
1506
+
1507
  $userdata = array(
1508
  'user_login' => $username,
1509
  'user_email' => $user_email,
1514
  'user_url' => $user_url,
1515
  );
1516
 
1517
+ do_action("mo_before_insert_user",$userdata,"6");
1518
  $user_id = wp_insert_user( $userdata);
1519
  if(is_wp_error( $user_id )) {
1520
  print_r($user_id);
class-mo-openid-sso-customer.php CHANGED
@@ -113,57 +113,6 @@ class CustomerOpenID {
113
  return $response['body'];
114
  }
115
 
116
- function send_otp_token($authType){
117
- $url = get_option('mo_openid_host_name') . '/moas/api/auth/challenge';
118
- $customerKey = $this->defaultCustomerKey;
119
- $apiKey = $this->defaultApiKey;
120
-
121
- $username = get_option('mo_openid_admin_email');
122
- $phone = get_option('mo_openid_admin_phone');
123
- $currentTimeInMillis = self::get_timestamp();
124
-
125
- /* Creating the Hash using SHA-512 algorithm */
126
- $stringToHash = $customerKey . $currentTimeInMillis . $apiKey;
127
- $hashValue = hash("sha512", $stringToHash);
128
-
129
- if($authType == 'EMAIL') {
130
- $fields = array(
131
- 'customerKey' => $customerKey,
132
- 'email' => $username,
133
- 'authType' => 'EMAIL',
134
- 'transactionName' => 'WordPress miniOrange Social Login, Social Sharing'
135
- );
136
- }else if($authType == 'SMS'){
137
- $fields = array(
138
- 'customerKey' => $customerKey,
139
- 'phone' => $phone,
140
- 'authType' => 'SMS',
141
- 'transactionName' => 'WordPress miniOrange Social Login, Social Sharing'
142
- );
143
- }
144
- $field_string = json_encode($fields);
145
-
146
-
147
- $headers = array(
148
- "Content-Type" => "application/json",
149
- "Customer-Key" => $customerKey,
150
- "Timestamp" => $currentTimeInMillis,
151
- "Authorization" => $hashValue
152
- );
153
- $args = array(
154
- 'method' => 'POST',
155
- 'body' => $field_string,
156
- 'timeout' => '5',
157
- 'redirection' => '5',
158
- 'httpversion' => '1.0',
159
- 'blocking' => true,
160
- 'headers' => $headers
161
- );
162
- $response = self::mo_openid_wp_remote_post($url, $args);
163
- return $response['body'];
164
-
165
- }
166
-
167
  function get_timestamp() {
168
  $url = get_option ( 'mo_openid_host_name' ) . '/moas/rest/mobile/get-timestamp';
169
  $response = self::mo_openid_wp_remote_post($url);
@@ -392,6 +341,98 @@ class CustomerOpenID {
392
  return $response['body'];
393
  }
394
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  function mo_openid_wp_remote_post($url, $args = array()){
396
 
397
  $response = wp_remote_post($url, $args);
113
  return $response['body'];
114
  }
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  function get_timestamp() {
117
  $url = get_option ( 'mo_openid_host_name' ) . '/moas/rest/mobile/get-timestamp';
118
  $response = self::mo_openid_wp_remote_post($url);
341
  return $response['body'];
342
  }
343
 
344
+ function check_customer_ln($licience_type){
345
+
346
+ $url = get_option('mo_openid_host_name') . '/moas/rest/customer/license';
347
+ $customerKey = get_option ( 'mo_openid_admin_customer_key' );
348
+ $apiKey = get_option ( 'mo_openid_admin_api_key' );
349
+
350
+ $currentTimeInMillis = self::get_timestamp();
351
+ $stringToHash = $customerKey . $currentTimeInMillis . $apiKey;
352
+ $hashValue = hash("sha512", $stringToHash);
353
+ if($licience_type=="general") {
354
+ $fields = array(
355
+ 'customerId' => $customerKey,
356
+ 'applicationName' => 'wp_social_login_premium'
357
+ );
358
+ }
359
+ else if($licience_type=="extra_attributes_addon") {
360
+ $fields = array(
361
+ 'customerId' => $customerKey,
362
+ 'applicationName' => 'wp_social_login_extra_attributes_addon'
363
+ );
364
+ }
365
+ $field_string = json_encode($fields);
366
+
367
+ $headers = array(
368
+ "Content-Type" => "application/json",
369
+ "Customer-Key" => $customerKey,
370
+ "Timestamp" => $currentTimeInMillis,
371
+ "Authorization" => $hashValue
372
+ );
373
+ $args = array(
374
+ 'method' => 'POST',
375
+ 'body' => $field_string,
376
+ 'timeout' => '5',
377
+ 'redirection' => '5',
378
+ 'httpversion' => '1.0',
379
+ 'blocking' => true,
380
+ 'headers' => $headers
381
+ );
382
+ $response = self::mo_openid_wp_remote_post($url, $args);
383
+ return $response['body'];
384
+ }
385
+
386
+ function mo_openid_vl($code,$active) {
387
+ if($active)
388
+ $url = get_option ( 'mo_openid_host_name' ) . '/moas/api/backupcode/check';
389
+ else
390
+ $url = get_option ( 'mo_openid_host_name' ) . '/moas/api/backupcode/verify';
391
+
392
+
393
+ /* The customer Key provided to you */
394
+ $customerKey = get_option ( 'mo_openid_admin_customer_key' );
395
+
396
+ /* The customer API Key provided to you */
397
+ $apiKey = get_option ( 'mo_openid_admin_api_key' );
398
+
399
+ $currentTimeInMillis = self::get_timestamp();
400
+ $stringToHash = $customerKey . $currentTimeInMillis . $apiKey;
401
+ $hashValue = hash ( "sha512", $stringToHash );
402
+
403
+ // *check for otp over sms/email
404
+
405
+ $fields = array (
406
+ 'code' => $code ,
407
+ 'customerKey' => $customerKey,
408
+ 'additionalFields' => array(
409
+ 'field1' => home_url()
410
+ )
411
+
412
+ );
413
+
414
+ $field_string = json_encode ( $fields );
415
+
416
+ $headers = array(
417
+ "Content-Type" => "application/json",
418
+ "Customer-Key" => $customerKey,
419
+ "Timestamp" => $currentTimeInMillis,
420
+ "Authorization" => $hashValue
421
+ );
422
+ $args = array(
423
+ 'method' => 'POST',
424
+ 'body' => $field_string,
425
+ 'timeout' => '5',
426
+ 'redirection' => '5',
427
+ 'httpversion' => '1.0',
428
+ 'blocking' => true,
429
+ 'headers' => $headers
430
+ );
431
+ $response = self::mo_openid_wp_remote_post($url, $args);
432
+ return $response['body'];
433
+
434
+ }
435
+
436
  function mo_openid_wp_remote_post($url, $args = array()){
437
 
438
  $response = wp_remote_post($url, $args);
includes/css/mo_openid_style.css CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  .mo_openid_modal {
2
 
3
  position: fixed; /* Stay in place */
1
+ .mywatermark {
2
+ background-image:url(../../includes/images/sample.png);
3
+ padding-bottom: 20px;
4
+ }
5
+
6
  .mo_openid_modal {
7
 
8
  position: fixed; /* Stay in place */
includes/images/sample.png ADDED
Binary file
miniorange_openid_sso_encryption.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package miniOrange
4
+ * @author miniOrange Security Software Pvt. Ltd.
5
+ * @license GNU/GPLv3
6
+ * @copyright Copyright 2015 miniOrange. All Rights Reserved.
7
+ *
8
+ *
9
+ * This file is part of miniOrange SAML plugin.
10
+ */
11
+
12
+ class MOAESEncryption {
13
+ /**
14
+ * @param string $data - the key=value pairs separated with &
15
+ * @return string
16
+ */
17
+ public static function encrypt_data($data, $key) {
18
+ $key = openssl_digest($key, 'sha256');
19
+ $method = 'AES-128-ECB';
20
+ $ivSize = openssl_cipher_iv_length($method);
21
+ $iv = openssl_random_pseudo_bytes($ivSize);
22
+ $strCrypt = openssl_encrypt ($data, $method, $key,OPENSSL_RAW_DATA||OPENSSL_ZERO_PADDING, $iv);
23
+ return base64_encode($iv.$strCrypt);
24
+ }
25
+
26
+
27
+ /**
28
+ * @param string $data - crypt response from Sagepay
29
+ * @return string
30
+ */
31
+ public static function decrypt_data($data, $key) {
32
+ $strIn = base64_decode($data);
33
+ $key = openssl_digest($key, 'sha256');
34
+ $method = 'AES-128-ECB';
35
+ $ivSize = openssl_cipher_iv_length($method);
36
+ $iv = substr($strIn,0,$ivSize);
37
+ $data = substr($strIn,$ivSize);
38
+ $clear = openssl_decrypt ($data, $method, $key, OPENSSL_RAW_DATA||OPENSSL_ZERO_PADDING, $iv);
39
+
40
+ return $clear;
41
+ }
42
+ }
43
+ ?>
miniorange_openid_sso_settings.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Social Login, Social Sharing by miniOrange
4
  * Plugin URI: https://plugins.miniorange.com/social-login-social-sharing
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.2.4
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.2.4');
17
  include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
18
  class Miniorange_OpenID_SSO {
19
 
@@ -31,6 +31,9 @@ class Miniorange_OpenID_SSO {
31
  add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_script' ) ,5);
32
  add_action( 'admin_footer', array( $this,'mo_openid_feedback_request' ));
33
 
 
 
 
34
  register_deactivation_hook(__FILE__, array( $this, 'mo_openid_deactivate'));
35
  register_activation_hook( __FILE__, array( $this, 'mo_openid_activate' ) );
36
 
@@ -51,6 +54,7 @@ class Miniorange_OpenID_SSO {
51
  add_shortcode( 'miniorange_social_sharing', array($this, 'mo_get_sharing_output') );
52
  add_shortcode( 'miniorange_social_sharing_vertical', array($this, 'mo_get_vertical_sharing_output') );
53
  add_shortcode( 'miniorange_social_comments', array($this, 'mo_get_comments_output') );
 
54
 
55
  // add social login icons to comment form
56
  if(get_option('mo_openid_default_comment_enable') == 1 ){
@@ -290,6 +294,10 @@ Thank you.';
290
  add_option('pop_login_msg','Enter Your Login Credentials.');
291
  }
292
 
 
 
 
 
293
  function mo_openid_feedback_request(){
294
  mo_openid_display_feedback_form();
295
  }
@@ -593,6 +601,10 @@ Thank you.';
593
  mo_register_openid();
594
  }
595
 
 
 
 
 
596
  function mo_openid_activation_message() {
597
  $class = "updated";
598
  $message = get_option('mo_openid_message');
@@ -634,6 +646,9 @@ Thank you.';
634
  }
635
 
636
  if( isset($_POST['mo_openid_connect_register_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_connect_register_customer" ) { //register the admin to miniOrange
 
 
 
637
  $nonce = $_POST['mo_openid_connect_register_nonce'];
638
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-register-nonce' ) ) {
639
  wp_die('<strong>ERROR</strong>: Invalid Request.');
@@ -648,7 +663,8 @@ Thank you.';
648
  $confirmPassword = '';
649
  $illegal = "#$%^*()+=[]';,/{}|:<>?~";
650
  $illegal = $illegal . '"';
651
- if( $this->mo_openid_check_empty_or_null( $_POST['company'] ) || $this->mo_openid_check_empty_or_null( $_POST['email'] ) || $this->mo_openid_check_empty_or_null( $_POST['password'] ) || $this->mo_openid_check_empty_or_null( $_POST['confirmPassword'] ) ) {
 
652
  update_option( 'mo_openid_message', 'All the fields are required. Please enter valid entries.');
653
  $this->mo_openid_show_error_message();
654
  if(get_option('regi_pop_up') =="yes") {
@@ -673,7 +689,6 @@ Thank you.';
673
  }
674
  return;
675
  } else {
676
- $company = sanitize_text_field($_POST['company']);
677
  $first_name = sanitize_text_field(isset($_POST['fname'])?$_POST['fname']:'');
678
  $last_name = sanitize_text_field(isset($_POST['lname'])?$_POST['lname']:'');
679
  $email = sanitize_email( $_POST['email'] );
@@ -683,45 +698,46 @@ Thank you.';
683
 
684
  }
685
 
686
- update_option( 'mo_openid_admin_company_name', $company);
687
  update_option( 'mo_openid_admin_first_name', $first_name);
688
  update_option( 'mo_openid_admin_last_name', $last_name);
689
  update_option( 'mo_openid_admin_email', $email );
690
  update_option( 'mo_openid_admin_phone', $phone );
691
 
 
692
  if( strcmp( $password, $confirmPassword) == 0 ) {
693
  update_option( 'mo_openid_admin_password', $password );
694
 
695
  $customer = new CustomerOpenID();
696
  $content = json_decode($customer->check_customer(), true);
697
- if( strcasecmp( $content['status'], 'CUSTOMER_NOT_FOUND') == 0 ){
698
- $content = json_decode($customer->send_otp_token('EMAIL'), true);
699
- if(strcasecmp($content['status'], 'SUCCESS') == 0) {
700
- if(get_option('mo_openid_email_otp_count')){
701
- update_option('mo_openid_email_otp_count',get_option('mo_openid_email_otp_count') + 1);
702
- update_option('mo_openid_message', 'Another One Time Passcode has been sent(' . get_option('mo_openid_email_otp_count') . ') for verification to ' . get_option('mo_openid_admin_email'));
703
- }else{
704
- update_option( 'mo_openid_message', ' A passcode is sent to ' . get_option('mo_openid_admin_email') . '. Please enter the otp here to verify your email.');
705
- update_option('mo_openid_email_otp_count',1);
706
- }
707
- update_option('mo_openid_transactionId',$content['txId']);
708
- update_option('mo_openid_registration_status','MO_OTP_DELIVERED_SUCCESS');
709
 
710
- $this->mo_openid_show_success_message();
711
- if(get_option('regi_pop_up') =="yes")
712
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
713
- }else{
 
 
 
 
 
 
714
 
715
- update_option('mo_openid_message','There was an error in sending email. Please click on Resend OTP to try again.');
716
- update_option('mo_openid_registration_status','MO_OTP_DELIVERED_FAILURE');
717
- $this->mo_openid_show_error_message();
718
- if(get_option('regi_pop_up') =="yes")
719
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
720
- }
721
- }else{
 
 
 
 
 
722
  $this->get_current_customer();
 
723
  }
724
 
 
725
  } else {
726
 
727
  update_option( 'mo_openid_message', 'Passwords do not match.');
@@ -736,89 +752,62 @@ Thank you.';
736
 
737
  } else if( isset( $_POST['show_login'] ) )
738
  {
739
-
740
  mo_pop_show_verify_password_page();
741
  }
742
- else if(isset($_POST['mo_openid_validate_otp_nonce']) and isset($_POST['option']) and $_POST['option'] == "mo_openid_validate_otp"){
743
- $nonce = $_POST['mo_openid_validate_otp_nonce'];
744
- if ( ! wp_verify_nonce( $nonce, 'mo-openid-validate-otp-nonce' ) ) {
 
745
  wp_die('<strong>ERROR</strong>: Invalid Request.');
746
  } else {
747
- //validation and sanitization
748
- $otp_token = '';
749
- if( $this->mo_openid_check_empty_or_null( $_POST['otp_token'] ) ) {
750
- update_option( 'mo_openid_message', 'Please enter a value in OTP field.');
751
- update_option('mo_openid_registration_status','MO_OTP_VALIDATION_FAILURE');
752
-
753
- $this->mo_openid_show_error_message();
754
- if(get_option('regi_pop_up') =="yes")
755
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
756
- return;
757
- } else if(!preg_match('/^[0-9]*$/', $_POST['otp_token'])) {
758
- update_option( 'mo_openid_message', 'Please enter a valid value in OTP field.');
759
- update_option('mo_openid_registration_status','MO_OTP_VALIDATION_FAILURE');
760
  $this->mo_openid_show_error_message();
761
-
762
- if(get_option('regi_pop_up') =="yes")
763
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
764
  return;
765
- } else{
766
- $otp_token = sanitize_text_field( $_POST['otp_token'] );
767
- }
768
-
769
- $customer = new CustomerOpenID();
770
- $content = json_decode($customer->validate_otp_token(get_option('mo_openid_transactionId'), $otp_token ),true);
771
- if(strcasecmp($content['status'], 'SUCCESS') == 0) {
772
- $this->create_customer();
773
- update_option('mo_openid_oauth','1');
774
- update_option('mo_openid_new_user','1');
775
- update_option('mo_openid_malform_error','1');
776
-
777
- }else{
778
- update_option( 'mo_openid_message','Invalid one time passcode. Please enter a valid passcode.');
779
- update_option('mo_openid_registration_status','MO_OTP_VALIDATION_FAILURE');
780
- $this->mo_openid_show_error_message();
781
- if(get_option('regi_pop_up') =="yes")
782
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
783
  }
784
- }
785
- }
786
- else if( isset($_POST['mo_openid_phone_verification_nonce']) and isset($_POST['option']) and $_POST['option'] == 'mo_openid_phone_verification'){ //at registration time
787
- $nonce = $_POST['mo_openid_phone_verification_nonce'];
788
- if ( ! wp_verify_nonce( $nonce, 'mo-openid-phone-verification-nonce' ) ) {
789
- wp_die('<strong>ERROR</strong>: Invalid Request.');
790
- } else {
791
- $phone = sanitize_text_field($_POST['phone_number']);
792
-
793
- $phone = str_replace(' ', '', $phone);
794
- update_option('mo_openid_admin_phone',$phone);
795
- $auth_type = 'SMS';
796
  $customer = new CustomerOpenID();
797
- $send_otp_response = json_decode($customer->send_otp_token($auth_type),true);
798
- if(strcasecmp($send_otp_response['status'], 'SUCCESS') == 0){
799
- //Save txId
800
-
801
- update_option('mo_openid_transactionId',$send_otp_response['txId']);
802
- update_option( 'mo_openid_registration_status','MO_OTP_DELIVERED_SUCCESS');
803
- if(get_option('mo_openid_sms_otp_count')){
804
- update_option('mo_openid_sms_otp_count',get_option('mo_openid_sms_otp_count') + 1);
805
- update_option('mo_openid_message', 'Another One Time Passcode has been sent (' . get_option('mo_openid_sms_otp_count') . ') for verification to ' . $phone);
806
- }else{
807
-
808
- update_option('mo_openid_message', 'One Time Passcode has been sent for verification to ' . $phone);
809
- update_option('mo_openid_sms_otp_count',1);
 
 
 
 
 
 
 
 
 
 
810
  }
811
-
812
- $this->mo_openid_show_success_message();
813
-
814
- }else{
815
- update_option('mo_openid_message','There was an error in sending sms. Please click on Resend OTP link next to phone number textbox.');
816
- update_option('mo_openid_registration_status','MO_OTP_DELIVERED_FAILURE');
817
  $this->mo_openid_show_error_message();
 
818
 
 
 
 
819
  }
 
820
  }
821
  }
 
822
  else if( isset($_POST['mo_openid_connect_verify_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_connect_verify_customer" ) { //register the admin to miniOrange
823
  $nonce = $_POST['mo_openid_connect_verify_nonce'];
824
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-verify-nonce' ) ) {
@@ -851,11 +840,19 @@ Thank you.';
851
  update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
852
  update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
853
  update_option( 'mo_openid_customer_token', $customerKey['token'] );
854
- update_option( 'mo_openid_admin_phone', $customerKey['phone'] );
855
  update_option('mo_openid_admin_password', '');
856
  update_option( 'mo_openid_message', 'Your account has been retrieved successfully.');
857
  delete_option('mo_openid_verify_customer');
858
  $this->mo_openid_show_success_message();
 
 
 
 
 
 
 
 
859
  } else {
860
  update_option( 'mo_openid_message', 'Invalid username or password. Please try again.');
861
  $this->mo_openid_show_error_message();
@@ -902,7 +899,7 @@ Thank you.';
902
 
903
  }
904
  }else{
905
- update_option( 'mo_openid_message','An error occured while processing your request. Please make sure you are registered with miniOrange with the given email address.');
906
  $this->mo_openid_show_error_message();
907
  if(get_option('regi_pop_up') =="yes"){
908
  update_option("pop_login_msg",get_option("mo_openid_message"));
@@ -1162,38 +1159,7 @@ Thank you.';
1162
  }
1163
  }
1164
  }
1165
- else if( isset($_POST['mo_openid_resend_otp_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_resend_otp" ) {
1166
- $nonce = $_POST['mo_openid_resend_otp_nonce'];
1167
- if ( ! wp_verify_nonce( $nonce, 'mo-openid-resend-otp-nonce' ) ) {
1168
- wp_die('<strong>ERROR</strong>: Invalid Request.');
1169
- } else {
1170
- $customer = new CustomerOpenID();
1171
- $content = json_decode($customer->send_otp_token('EMAIL'), true);
1172
- if(strcasecmp($content['status'], 'SUCCESS') == 0) {
1173
- if(get_option('mo_openid_email_otp_count')){
1174
- update_option('mo_openid_email_otp_count',get_option('mo_openid_email_otp_count') + 1);
1175
- update_option('mo_openid_message', 'Another One Time Passcode has been sent (' . get_option('mo_openid_email_otp_count') . ') for verification to ' . get_option('mo_openid_admin_email'));
1176
- if(get_option('regi_pop_up') =="yes")
1177
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
1178
- }else{
1179
- update_option( 'mo_openid_message', ' A passcode is sent to ' . get_option('mo_openid_admin_email') . '. Please enter the otp here to verify your email.');
1180
- update_option('mo_openid_email_otp_count',1);
1181
- if(get_option('regi_pop_up') =="yes")
1182
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
1183
- }
1184
- update_option('mo_openid_transactionId',$content['txId']);
1185
- update_option('mo_openid_registration_status','MO_OTP_DELIVERED_SUCCESS');
1186
- $this->mo_openid_show_success_message();
1187
- }else{
1188
-
1189
- update_option('mo_openid_message','There was an error in sending email. Please click on Resend OTP to try again.');
1190
- update_option('mo_openid_registration_status','MO_OTP_DELIVERED_FAILURE');
1191
- $this->mo_openid_show_error_message();
1192
- if(get_option('regi_pop_up') =="yes")
1193
- mo_pop_show_otp_verification(get_option('mo_openid_message'));
1194
- }
1195
- }
1196
- }else if( isset($_POST['mo_openid_go_back_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_go_back" ){
1197
  $nonce = $_POST['mo_openid_go_back_nonce'];
1198
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-go-back-nonce' ) ) {
1199
  wp_die('<strong>ERROR</strong>: Invalid Request.');
@@ -1284,6 +1250,7 @@ Thank you.';
1284
  }
1285
  }
1286
  }
 
1287
  else if( isset($_POST['mo_openid_add_custom_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_add_custom_app" ) {
1288
  $nonce = $_POST['mo_openid_add_custom_nonce'];
1289
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-add-custom-app-nonce' ) ) {
@@ -1418,9 +1385,21 @@ Thank you.';
1418
  delete_option('mo_openid_email_otp_count');
1419
  $customer = new CustomerOpenID();
1420
  $customerKey = json_decode( $customer->create_customer(), true );
 
1421
  if( strcasecmp( $customerKey['status'], 'CUSTOMER_USERNAME_ALREADY_EXISTS') == 0 ) {
1422
  $this->get_current_customer();
1423
- } else if( strcasecmp( $customerKey['status'], 'SUCCESS' ) == 0 ) {
 
 
 
 
 
 
 
 
 
 
 
1424
  update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
1425
  update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
1426
  update_option( 'mo_openid_customer_token', $customerKey['token'] );
@@ -1469,6 +1448,9 @@ Thank you.';
1469
  //Add miniOrange plugin to the menu
1470
  $page = add_menu_page( 'MO OpenID Settings ' . __( 'Configure OpenID', 'mo_openid_settings' ), 'miniOrange Social Login, Sharing', 'manage_options',
1471
  'mo_openid_settings', array( $this, 'mo_login_widget_openid_options' ),plugin_dir_url(__FILE__) . 'includes/images/miniorange_icon.png');
 
 
 
1472
  }
1473
 
1474
  function mo_openid_plugin_actions( $links, $file ) {
@@ -1522,6 +1504,55 @@ Thank you.';
1522
  }
1523
  }
1524
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1525
  function mo_social_login_custom_avatar( $avatar, $mixed, $size, $default, $alt = '' ) {
1526
 
1527
  if ( is_numeric( $mixed ) AND $mixed > 0 ) { //Check if we have a user identifier
3
  * Plugin Name: Social Login, Social Sharing by miniOrange
4
  * Plugin URI: https://plugins.miniorange.com/social-login-social-sharing
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.2.5
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.2.5');
17
  include dirname( __FILE__ ) . '/mo_openid_feedback_form.php';
18
  class Miniorange_OpenID_SSO {
19
 
31
  add_action( 'wp_enqueue_scripts', array( $this, 'mo_openid_plugin_script' ) ,5);
32
  add_action( 'admin_footer', array( $this,'mo_openid_feedback_request' ));
33
 
34
+ //for addon
35
+ add_action('wp_ajax_verify_addon_licience', array($this, 'mo_openid_show_verify_license_page'));
36
+
37
  register_deactivation_hook(__FILE__, array( $this, 'mo_openid_deactivate'));
38
  register_activation_hook( __FILE__, array( $this, 'mo_openid_activate' ) );
39
 
54
  add_shortcode( 'miniorange_social_sharing', array($this, 'mo_get_sharing_output') );
55
  add_shortcode( 'miniorange_social_sharing_vertical', array($this, 'mo_get_vertical_sharing_output') );
56
  add_shortcode( 'miniorange_social_comments', array($this, 'mo_get_comments_output') );
57
+ add_shortcode( 'miniorange_social_custom_fields', array($this, 'mo_get_custom_output') );
58
 
59
  // add social login icons to comment form
60
  if(get_option('mo_openid_default_comment_enable') == 1 ){
294
  add_option('pop_login_msg','Enter Your Login Credentials.');
295
  }
296
 
297
+ function mo_openid_show_verify_license_page(){
298
+ wp_send_json(["html"=> mo_openid_show_verify_addon_license_page('extra_attributes_addon')]);
299
+ }
300
+
301
  function mo_openid_feedback_request(){
302
  mo_openid_display_feedback_form();
303
  }
601
  mo_register_openid();
602
  }
603
 
604
+ function mo_login_widget_openid_options_addon() {
605
+ mo_register_openid_addon();
606
+ }
607
+
608
  function mo_openid_activation_message() {
609
  $class = "updated";
610
  $message = get_option('mo_openid_message');
646
  }
647
 
648
  if( isset($_POST['mo_openid_connect_register_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_connect_register_customer" ) { //register the admin to miniOrange
649
+
650
+
651
+
652
  $nonce = $_POST['mo_openid_connect_register_nonce'];
653
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-register-nonce' ) ) {
654
  wp_die('<strong>ERROR</strong>: Invalid Request.');
663
  $confirmPassword = '';
664
  $illegal = "#$%^*()+=[]';,/{}|:<>?~";
665
  $illegal = $illegal . '"';
666
+ if( $this->mo_openid_check_empty_or_null( $_POST['email'] ) || $this->mo_openid_check_empty_or_null( $_POST['password'] ) || $this->mo_openid_check_empty_or_null( $_POST['confirmPassword'] ) ) {
667
+
668
  update_option( 'mo_openid_message', 'All the fields are required. Please enter valid entries.');
669
  $this->mo_openid_show_error_message();
670
  if(get_option('regi_pop_up') =="yes") {
689
  }
690
  return;
691
  } else {
 
692
  $first_name = sanitize_text_field(isset($_POST['fname'])?$_POST['fname']:'');
693
  $last_name = sanitize_text_field(isset($_POST['lname'])?$_POST['lname']:'');
694
  $email = sanitize_email( $_POST['email'] );
698
 
699
  }
700
 
 
701
  update_option( 'mo_openid_admin_first_name', $first_name);
702
  update_option( 'mo_openid_admin_last_name', $last_name);
703
  update_option( 'mo_openid_admin_email', $email );
704
  update_option( 'mo_openid_admin_phone', $phone );
705
 
706
+
707
  if( strcmp( $password, $confirmPassword) == 0 ) {
708
  update_option( 'mo_openid_admin_password', $password );
709
 
710
  $customer = new CustomerOpenID();
711
  $content = json_decode($customer->check_customer(), true);
 
 
 
 
 
 
 
 
 
 
 
 
712
 
713
+ if( strcasecmp( $content['status'], 'CUSTOMER_NOT_FOUND') == 0 ){
714
+ if ( $content['status'] == 'ERROR' ) {
715
+ update_option( 'mo_openid_message',$content['message'] );
716
+ $this->mo_openid_show_error_message();
717
+ } else {
718
+ $this->create_customer();
719
+ update_option('mo_openid_oauth','1');
720
+ update_option('mo_openid_new_user','1');
721
+ update_option('mo_openid_malform_error','1');
722
+ }
723
 
724
+
725
+ }
726
+ else if ($content == null){
727
+ update_option( 'mo_openid_message',"Please check your internet connetion and try again." );
728
+ $this->mo_openid_show_error_message();
729
+ if(get_option('regi_pop_up') =="yes"){
730
+ update_option('pop_regi_msg', get_option('mo_openid_message'));
731
+ mo_openid_registeration_modal();
732
+ }
733
+
734
+ }
735
+ else{
736
  $this->get_current_customer();
737
+
738
  }
739
 
740
+
741
  } else {
742
 
743
  update_option( 'mo_openid_message', 'Passwords do not match.');
752
 
753
  } else if( isset( $_POST['show_login'] ) )
754
  {
 
755
  mo_pop_show_verify_password_page();
756
  }
757
+
758
+ else if(isset($_POST['mo_openid_verify_license_nonce']) and isset($_POST['option']) && $_POST['option'] == 'mo_openid_verify_license') {
759
+ $nonce = $_POST['mo_openid_verify_license_nonce'];
760
+ if (!wp_verify_nonce($nonce, 'mo-openid-verify-license-nonce')) {
761
  wp_die('<strong>ERROR</strong>: Invalid Request.');
762
  } else {
763
+ if ($this->mo_openid_check_empty_or_null($_POST['openid_licence_key'])) {
764
+ update_option('mo_openid_message', 'All the fields are required. Please enter valid license key.');
 
 
 
 
 
 
 
 
 
 
 
765
  $this->mo_openid_show_error_message();
 
 
 
766
  return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
767
  }
768
+ $code = trim($_POST['openid_licence_key']);
 
 
 
 
 
 
 
 
 
 
 
769
  $customer = new CustomerOpenID();
770
+ $content = json_decode($customer->check_customer_ln($_POST['licience_type']), true);
771
+ if (strcasecmp($content['status'], 'SUCCESS') == 0) {
772
+ $content = json_decode($customer->mo_openid_vl($code, false), true);
773
+ update_option('mo_openid_vl_check_t', time());
774
+ if (strcasecmp($content['status'], 'SUCCESS') == 0) {
775
+ $key = get_option('mo_openid_customer_token');
776
+ update_option('mo_openid_opn_lk_extra_attr_addon', MOAESEncryption::encrypt_data($code, $key));
777
+ update_option('mo_openid_message', 'Your addon license is verified. You can now setup the addon plugin.');
778
+ $key = get_option('mo_openid_customer_token');
779
+ update_option('mo_openid_site_ck_l', MOAESEncryption::encrypt_data("true", $key));
780
+ update_option('mo_openid_t_site_status', MOAESEncryption::encrypt_data("false", $key));
781
+ $this->mo_openid_show_success_message();
782
+ } else if (strcasecmp($content['status'], 'FAILED') == 0) {
783
+ if (strcasecmp($content['message'], 'Code has Expired') == 0) {
784
+ $url = add_query_arg(array('tab' => 'pricing'), $_SERVER['REQUEST_URI']);
785
+ update_option('mo_openid_message', 'License key you have entered has already been used. Please enter a key which has not been used before on any other instance or if you have exausted all your keys then <a href="' . $url . '">Click here</a> to buy more.');
786
+ } else {
787
+ update_option('mo_openid_message', 'You have entered an invalid license key. Please enter a valid license key.');
788
+ }
789
+ $this->mo_openid_show_error_message();
790
+ } else {
791
+ update_option('mo_openid_message', 'An error occured while processing your request. Please Try again.');
792
+ $this->mo_openid_show_error_message();
793
  }
794
+ }
795
+ else {
796
+ $key = get_option('mo_openid_customer_token');
797
+ update_option('mo_openid_site_ck_l', MOAESEncryption::encrypt_data("false", $key));
798
+ $url = add_query_arg(array('tab' => 'pricing'), $_SERVER['REQUEST_URI']);
799
+ update_option('mo_openid_message', 'You have not upgraded yet. <a href="' . $url . '">Click here</a> to upgrade to premium version.');
800
  $this->mo_openid_show_error_message();
801
+ }
802
 
803
+ $content = json_decode($customer->check_customer_valid(), true);
804
+ if (strcasecmp($content['status'], 'SUCCESS') == 0) {
805
+ update_option('mo_openid_admin_customer_plan', isset($content['licensePlan']) ? base64_encode($content['licensePlan']) : 0);
806
  }
807
+
808
  }
809
  }
810
+
811
  else if( isset($_POST['mo_openid_connect_verify_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_connect_verify_customer" ) { //register the admin to miniOrange
812
  $nonce = $_POST['mo_openid_connect_verify_nonce'];
813
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-connect-verify-nonce' ) ) {
840
  update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
841
  update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
842
  update_option( 'mo_openid_customer_token', $customerKey['token'] );
843
+ //update_option( 'mo_openid_admin_phone', $customerKey['phone'] );
844
  update_option('mo_openid_admin_password', '');
845
  update_option( 'mo_openid_message', 'Your account has been retrieved successfully.');
846
  delete_option('mo_openid_verify_customer');
847
  $this->mo_openid_show_success_message();
848
+ }else if ($content == null){
849
+ update_option( 'mo_openid_message',"Please check your internet connetion and try again." );
850
+ $this->mo_openid_show_error_message();
851
+ if(get_option('regi_pop_up') =="yes"){
852
+ update_option('pop_regi_msg', get_option('mo_openid_message'));
853
+ mo_openid_registeration_modal();
854
+ }
855
+
856
  } else {
857
  update_option( 'mo_openid_message', 'Invalid username or password. Please try again.');
858
  $this->mo_openid_show_error_message();
899
 
900
  }
901
  }else{
902
+ update_option( 'mo_openid_message','An error occurred while processing your request. Please make sure you are registered in miniOrange with the <b>'. $content['email'] .'</b> email address. ');
903
  $this->mo_openid_show_error_message();
904
  if(get_option('regi_pop_up') =="yes"){
905
  update_option("pop_login_msg",get_option("mo_openid_message"));
1159
  }
1160
  }
1161
  }
1162
+ else if( isset($_POST['mo_openid_go_back_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_go_back" ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1163
  $nonce = $_POST['mo_openid_go_back_nonce'];
1164
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-go-back-nonce' ) ) {
1165
  wp_die('<strong>ERROR</strong>: Invalid Request.');
1250
  }
1251
  }
1252
  }
1253
+
1254
  else if( isset($_POST['mo_openid_add_custom_nonce']) and isset( $_POST['option'] ) and $_POST['option'] == "mo_openid_add_custom_app" ) {
1255
  $nonce = $_POST['mo_openid_add_custom_nonce'];
1256
  if ( ! wp_verify_nonce( $nonce, 'mo-openid-add-custom-app-nonce' ) ) {
1385
  delete_option('mo_openid_email_otp_count');
1386
  $customer = new CustomerOpenID();
1387
  $customerKey = json_decode( $customer->create_customer(), true );
1388
+
1389
  if( strcasecmp( $customerKey['status'], 'CUSTOMER_USERNAME_ALREADY_EXISTS') == 0 ) {
1390
  $this->get_current_customer();
1391
+ }
1392
+ else if((strcasecmp( $customerKey['status'], 'FAILED' ) == 0) && (strcasecmp( $customerKey['message'], 'Email is not enterprise email.' ) == 0) ){
1393
+
1394
+ update_option( 'mo_openid_message',' There was an error creating an account for you. You may have entered an invalid Email-Id. <b> (We discourage the use of disposable emails) </b> Please try again with a valid email.');
1395
+ update_option('mo_openid_registration_status','EMAIL_IS_NOT_ENTERPRISE');
1396
+ $this->mo_openid_show_error_message();
1397
+ if(get_option('regi_pop_up') =="yes"){
1398
+ update_option('pop_regi_msg', get_option('mo_openid_message'));
1399
+ mo_openid_registeration_modal();
1400
+ }
1401
+ }
1402
+ else if( strcasecmp( $customerKey['status'], 'SUCCESS' ) == 0 ) {
1403
  update_option( 'mo_openid_admin_customer_key', $customerKey['id'] );
1404
  update_option( 'mo_openid_admin_api_key', $customerKey['apiKey'] );
1405
  update_option( 'mo_openid_customer_token', $customerKey['token'] );
1448
  //Add miniOrange plugin to the menu
1449
  $page = add_menu_page( 'MO OpenID Settings ' . __( 'Configure OpenID', 'mo_openid_settings' ), 'miniOrange Social Login, Sharing', 'manage_options',
1450
  'mo_openid_settings', array( $this, 'mo_login_widget_openid_options' ),plugin_dir_url(__FILE__) . 'includes/images/miniorange_icon.png');
1451
+ $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-General Settings','General Settings', 'administrator','mo_openid_general_settings',array( $this, 'mo_login_widget_openid_options' ));
1452
+ $page = add_submenu_page( 'mo_openid_settings', 'MiniOrange-Add_On','Add-On', 'administrator','mo_openid_settings_addOn',array( $this, 'mo_login_widget_openid_options_addon' ));
1453
+ remove_submenu_page('mo_openid_settings','mo_openid_settings');
1454
  }
1455
 
1456
  function mo_openid_plugin_actions( $links, $file ) {
1504
  }
1505
  }
1506
 
1507
+ public function mo_get_custom_output(){
1508
+ if(mo_openid_is_customer_registered()){
1509
+ $title = '';
1510
+ global $post;
1511
+ if(isset($post)) {
1512
+ $content=get_the_content();
1513
+ $title = str_replace('+', '%20', urlencode($post->post_title));
1514
+ $content=strip_shortcodes( strip_tags( get_the_content() ) );
1515
+ }
1516
+ $curr_user=get_current_user_id();
1517
+ if($curr_user==0)
1518
+ {
1519
+ $last_name = isset($_POST['last_name'])?$_POST['last_name']:"";
1520
+ $first_name = isset($_POST['first_name'])?$_POST['first_name']:"";
1521
+ $user_full_name = isset($_POST['user_full_name'])?$_POST['user_full_name']:"";
1522
+ $user_url = isset($_POST['user_url'])?$_POST['user_url']:"";
1523
+ $call = $_POST['call'];
1524
+ $user_profile_url = isset($_POST['user_profile_url'])?$_POST['user_profile_url']:"";
1525
+ $user_picture = isset($_POST['user_picture'])?$_POST['user_picture']:"";
1526
+ $username = isset($_POST['username'])?$_POST['username']:"";
1527
+ $user_email = isset($_POST['user_email'])?$_POST['user_email']:"";
1528
+ $random_password = isset($_POST['random_password'])?$_POST['random_password']:"";
1529
+ $decrypted_app_name = isset($_POST['decrypted_app_name'])?$_POST['decrypted_app_name']:"";
1530
+ $decrypted_user_id = isset($_POST['decrypted_user_id'])?$_POST['decrypted_user_id']:"";
1531
+ $social_app_name = isset($_POST['social_app_name'])?$_POST['social_app_name']:"";
1532
+ $social_user_id = isset($_POST['social_user_id'])?$_POST['social_user_id']:"";
1533
+ }
1534
+ else
1535
+ {
1536
+ $last_name = "";
1537
+ $first_name = "";
1538
+ $user_full_name = "";
1539
+ $user_url = "";
1540
+ $call = "";
1541
+ $user_profile_url = "";
1542
+ $user_picture = "";
1543
+ $username = "";
1544
+ $user_email = "";
1545
+ $random_password = "";
1546
+ $decrypted_app_name = "";
1547
+ $decrypted_user_id = "";
1548
+ $social_app_name = "";
1549
+ $social_user_id = "";
1550
+ }
1551
+ $html = apply_filters('customization_form', $last_name, $first_name, $user_full_name, $user_url, $call, $user_profile_url, $user_picture, $username, $user_email, $random_password, $decrypted_app_name, $decrypted_user_id, $social_app_name, $social_user_id);
1552
+ return $html;
1553
+ }
1554
+ }
1555
+
1556
  function mo_social_login_custom_avatar( $avatar, $mixed, $size, $default, $alt = '' ) {
1557
 
1558
  if ( is_numeric( $mixed ) AND $mixed > 0 ) { //Check if we have a user identifier
miniorange_openid_sso_settings_page.php CHANGED
@@ -4,7 +4,7 @@ function mo_register_openid() {
4
 
5
  if(get_option('mo_openid_social_comment_google') == 1){
6
  ?>
7
- <div id="upgrade_notice" class="update-nag" style="width: 92.5%;margin-left: 0%;"><strong>Google+ APIs will be shut down soon on March 7, 2019. So please disable the Google+ commenting option from<a href="<?php echo site_url();?>/wp-admin/admin.php?page=mo_openid_settings&tab=comment" ><b> Social Comments</b></a> tab.</strong></div>
8
  <?php }
9
  if( isset( $_GET[ 'tab' ]) && $_GET[ 'tab' ] !== 'register' ) {
10
  $active_tab = $_GET[ 'tab' ];
@@ -29,7 +29,9 @@ function mo_register_openid() {
29
  <td> &nbsp;&nbsp;&nbsp;&nbsp; <a id="pricing" style="margin-top: 23px" class="button"<?php echo $active_tab == 'pricing' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'pricing'), $_SERVER['REQUEST_URI'] ); ?>">Licensing Plans</a>
30
  </td> <td>&nbsp; <a id="privacy" style="margin-top: 23px" class="button" <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'privacy_policy'), $_SERVER['REQUEST_URI'] ); ?>">Privacy Policy</a>
31
  </td> <td> &nbsp; <a id="faq" style="margin-top: 23px" class="button" <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'help'), $_SERVER['REQUEST_URI'] ); ?>">FAQ</a>
32
- </td></tr> </table>
 
 
33
  </div>
34
  <div id="tab">
35
  <h2 class="nav-tab-wrapper">
@@ -58,9 +60,18 @@ function mo_register_openid() {
58
  content: "Enable one click login to your website using various Social Login applications.",
59
  backdrop:'body',
60
  backdropPadding:'6',
 
 
 
 
 
 
 
 
61
  onNext: function() {
62
  window.location = base_url+'/wp-admin/admin.php?page=mo_openid_settings&tab=custom_app'
63
  }
 
64
  },{
65
  element: "#custom_app",
66
  title: "Custom App",
@@ -123,9 +134,9 @@ function mo_register_openid() {
123
  ],
124
  template: function () {
125
  return (
126
- tour1.getCurrentStep()===6 // Is this the last step?
127
- ? "<div class=\"mo2f_popover\" role=\"tooltip\"> <div class=\"mo2f_arrow\" ></div> <h3 class=\"mo2f_popover-header\" style=\"margin-top:10%;\"></h3> <div class=\"mo2f_popover-body\"></div> <div class=\"mo2f_popover-navigation\"> <div class=\"mo2f_tour_btn-group\"><div style=\"width:47%;margin-top: -7%;\"><h4 style=\"float:left;margin-top:30%;margin-left:30%;\">"+ (tour1.getCurrentStep()+1)+"/7</h4></div></div>&nbsp;&nbsp; <button class=\"button button-primary button-large\" data-role=\"end\" onclick=\"end_tour1();\">Done</button> </div> </div>"
128
- : "<div class=\"mo2f_popover\" role=\"tooltip\"> <div class=\"mo2f_arrow\" ></div> <h3 class=\"mo2f_popover-header\" style=\"margin-top:0px;\"></h3> <div class=\"mo2f_popover-body\"></div> <div class=\"mo2f_popover-navigation\"> <div class=\"mo2f_tour_btn-group\" style=\"width: 100%;\"> <button class=\"mo2f_tour_btn mo2f_tour_btn-sm mo2f_tour_btn-secondary mo2f_tour_btn_next-success\" style=\"width: 32%;height: 0%;\" data-role=\"next\">Next &raquo;</button><div style=\"width:47%;margin-top: -7%;\"><h4 style=\"float:right;margin-left: 53%;\">"+ (tour1.getCurrentStep()+1)+"/7</h4></div></div></div></div>"
129
  );
130
  }
131
  });
@@ -200,7 +211,9 @@ function mo_register_openid() {
200
  } else if($active_tab == 'pricing') {
201
  mo_openid_pricing_info();
202
  } else if($active_tab == 'help') {
203
- mo_openid_troubleshoot_info();
 
 
204
  } else if($active_tab == 'privacy_policy'){
205
  mo_openid_privacy_policy();
206
  }
@@ -223,6 +236,76 @@ function mo_register_openid() {
223
  <?php
224
  }
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  function mo_openid_show_new_registration_page() {
227
  update_option('regi_pop_up','no');
228
  update_option ( 'mo_openid_new_registration', 'true' );
@@ -249,12 +332,6 @@ function mo_openid_show_new_registration_page() {
249
  required placeholder="person@example.com"
250
  value="<?php echo esc_attr($current_user->user_email);?>" /></td>
251
  </tr>
252
- <tr>
253
- <td><b><font color="#FF0000">*</font>Website/Company Name:</b></td>
254
- <td><input class="mo_openid_table_textbox" type="text" name="company"
255
- required placeholder="Enter website or company name"
256
- value="<?php echo $_SERVER['SERVER_NAME']; ?>"/></td>
257
- </tr>
258
  <tr>
259
  <td><b><font color="#FF0000">*</font>Password:</b></td>
260
  <td><input class="mo_openid_table_textbox" required type="password"
@@ -267,14 +344,14 @@ function mo_openid_show_new_registration_page() {
267
  </tr>
268
  <tr>
269
  <td>&nbsp;</td>
270
- <td><br /><input type="submit" name="submit" value="Next" style="width:100px;"
271
  class="button button-primary button-large" />
272
  <input type="button" value="Login Page" id="mo_openid_go_back_registration" style="width:150px;"
273
  class="button button-primary button-large" />
274
  </td>
275
  </tr>
276
  </table>
277
- <br/>By clicking Next, you agree to our <a href="https://www.miniorange.com/usecases/miniOrange_Privacy_Policy.pdf" target="_blank">Privacy Policy</a> and <a href="https://www.miniorange.com/usecases/miniOrange_User_Agreement.pdf" target="_blank">User Agreement</a>.
278
  </div>
279
  </form>
280
  <form name="f" method="post" action="" id="openidgobackloginform">
@@ -367,24 +444,20 @@ function mo_openid_apps_config() {
367
  <input type="hidden" name="option" value="mo_openid_enable_apps" />
368
  <input type="hidden" name="mo_openid_enable_apps_nonce"
369
  value="<?php echo wp_create_nonce( 'mo-openid-enable-apps-nonce' ); ?>"/>
370
-
371
  <div class="mo_openid_table_layout">
372
-
373
-
374
  <table>
375
  <tr>
376
  <td colspan="2">
377
  <h3>Social Login
378
- <input type="submit" name="submit" id="save_opt" value="Save" style="float:right; margin-right:2%; margin-top: -3px;width:100px;" class="button button-primary button-large" onclick="end_tour();" /> <button type="button" id="mo_openid_restart_tour" class="button button-primary button-large" style="float:right; margin-right:2%; margin-top: -3px;width:20%" onclick="restart_tour();"><i class="fa fa-refresh"></i> Social Login Tour</button>
379
  </h3>
380
  <b>Select applications to enable login for your users. Customize your login icons using a range of shapes, themes and sizes. You can choose different places to display these icons and also customize redirect URL after login.</b>
381
  </td>
382
-
383
  </tr>
384
  </table>
385
-
386
  <table>
387
- <tr id="select_app"><td><table style="width: 100%"> <h3>Select Apps</h3>
 
388
  <h4>Select Default Apps:</h4>
389
 
390
  <tr >
@@ -439,13 +512,16 @@ function mo_openid_apps_config() {
439
  </tr>
440
  <tr><td><h4>Setup Custom Apps:</h4></td>
441
  </tr>
442
- <tr><td>
443
- <div>
 
444
  <input type="checkbox" id="facebook_enable" class="app_enable tooltip" name="mo_openid_facebook_enable" value="1" <?php $x=is_custom_app('facebook');echo "onchange='previewLoginIcons(),redirectto_custom_tab(".$x.")'";?>
445
  <?php checked( get_option('mo_openid_facebook_enable') == 1 );?> /><strong> Facebook </strong>
446
- &nbsp &nbsp &nbsp&nbsp &nbsp <input type="checkbox" class="app_enable" disabled="disabled" /><strong><span style="color: red">*</span>Disqus</strong>
 
 
447
  </div>
448
- </td>
449
  </tr>
450
  </table></td></tr>
451
  <tr>
@@ -1524,11 +1600,18 @@ function customize_email_verify_img(){
1524
  </tr>
1525
  </table>
1526
  </div>
1527
- </td></tr>
 
 
 
 
 
 
 
1528
  <tr>
1529
  <td>
1530
  <br>
1531
-
1532
  <h3><span style="color:red;">* </span>Account Linking</h3>
1533
  </td>
1534
  </tr>
@@ -2011,89 +2094,6 @@ function mo_openid_app_comment() {
2011
  <?php
2012
  }
2013
 
2014
- function mo_openid_show_otp_verification(){
2015
- ?>
2016
- <td style="vertical-align:top;width:65%;">
2017
- <!-- Enter otp -->
2018
- <form name="f" method="post" id="otp_form" action="">
2019
- <input type="hidden" name="option" value="mo_openid_validate_otp" />
2020
- <input type="hidden" name="mo_openid_validate_otp_nonce"
2021
- value="<?php echo wp_create_nonce( 'mo-openid-validate-otp-nonce' ); ?>"/>
2022
- <div class="mo_openid_table_layout">
2023
- <table class="mo_openid_settings_table">
2024
- <h3>Verify Your Email</h3>
2025
- <tr>
2026
- <td><b><font color="#FF0000">*</font>Enter OTP:</b></td>
2027
- <td colspan="3"><input class="mo_openid_table_textbox" autofocus="true" type="text" name="otp_token" required placeholder="Enter OTP" style="width:40%;" />
2028
- &nbsp;&nbsp;<a style="cursor:pointer;" onclick="document.getElementById('resend_otp_form').submit();">Resend OTP ?</a></td>
2029
- </tr>
2030
- <tr><td colspan="3"></td></tr>
2031
- <tr>
2032
-
2033
- <td>&nbsp;</td>
2034
- <td style="width:17%">
2035
- <input type="submit" name="submit" value="Validate OTP" class="button button-primary button-large" /></td>
2036
-
2037
- </form>
2038
- <form name="f" method="post">
2039
- <td style="width:18%">
2040
- <input type="hidden" name="option" value="mo_openid_go_back"/>4
2041
- <input type="hidden" name="mo_openid_go_back_nonce"
2042
- value="<?php echo wp_create_nonce( 'mo-openid-go-back-nonce' ); ?>"/>
2043
- <input type="submit" name="submit" value="Back" class="button button-primary button-large" />
2044
- </td>
2045
- </form>
2046
- <form name="f" id="resend_otp_form" method="post" action="">
2047
- <td>
2048
-
2049
- <input type="hidden" name="option" value="mo_openid_resend_otp"/>
2050
- <input type="hidden" name="mo_openid_resend_otp_nonce"
2051
- value="<?php echo wp_create_nonce( 'mo-openid-resend-otp-nonce' ); ?>"/>
2052
- </td>
2053
- </tr>
2054
- </form>
2055
- </table>
2056
- <br>
2057
- <hr>
2058
-
2059
- <h3>I did not recieve any email with OTP . What should I do ?</h3>
2060
- <form id="phone_verification" method="post" action="">
2061
- <input type="hidden" name="option" value="mo_openid_phone_verification" />
2062
- <input type="hidden" name="mo_openid_phone_verification_nonce"
2063
- value="<?php echo wp_create_nonce( 'mo-openid-phone-verification-nonce' ); ?>"/>
2064
- If you can't see the email from miniOrange in your mails, please check your <b>SPAM Folder</b>. If you don't see an email even in SPAM folder, verify your identity with our alternate method.
2065
- <br><br>
2066
- <b>Enter your valid phone number here and verify your identity using one time passcode sent to your phone.</b>
2067
- <br><br>
2068
- <table class="mo_openid_settings_table">
2069
- <tr>
2070
- <td colspan="3">
2071
- <input class="mo_openid_table_textbox" required pattern="[0-9\+]{12,18}" autofocus="true" style="width:100%;" type="tel" name="phone_number" id="phone" placeholder="Enter Phone Number" value="<?php echo esc_attr(get_option('mo_openid_admin_phone')); ?>" title="Enter phone number(at least 10 digits) without any space or dashes."/>
2072
- </td>
2073
- <td>&nbsp;&nbsp;
2074
- <a style="cursor:pointer;" onclick="document.getElementById('phone_verification').submit();">Resend OTP ?</a>
2075
- </td>
2076
- </tr>
2077
- </table>
2078
- <br><input type="submit" value="Send OTP" class="button button-primary button-large" />
2079
-
2080
- </form>
2081
- <br>
2082
- <h3>What is an OTP ?</h3>
2083
- <p>OTP is a one time passcode ( a series of numbers) that is sent to your email or phone number to verify that you have access to your email account or phone. </p>
2084
- </div>
2085
- <script>
2086
- jQuery("#phone").intlTelInput();
2087
- </script>
2088
-
2089
- </td>
2090
- <td style="vertical-align:top;padding-left:1%;">
2091
- <?php echo miniorange_openid_support(); ?>
2092
- </td>
2093
-
2094
- <?php
2095
- }
2096
-
2097
  function mo_openid_other_settings(){
2098
 
2099
  ?>
@@ -2378,7 +2378,10 @@ function mo_openid_other_settings(){
2378
  </div>
2379
 
2380
  </td>
2381
- </tr></table></td></tr>
 
 
 
2382
 
2383
  <script>
2384
  var tempHorSize = '<?php echo esc_attr(get_option('mo_sharing_icon_custom_size')) ?>';
@@ -3080,7 +3083,7 @@ function mo_openid_shortcode_info(){
3080
  <b>space</b>: Any value between 0 to 50<br>
3081
  <b>url</b>: Enter custom URL for sharing<br>
3082
  <b>fontcolor</b>: Enter custom color for icons (only works with no background theme)<br>
3083
- <h4 style="margin-bottom:0 !important">Horizontal attributes</h4>
3084
  <b>heading</b>: Enter custom heading text<br>
3085
  <b>color</b>: Enter custom text color for heading eg: cyan, red, blue, orange, yellow <br>
3086
  <br>
@@ -3186,8 +3189,8 @@ function mo_openid_pricing_info(){
3186
  <tr>
3187
  <td><div class="tooltip">Custom Social Login Apps <i class="fa fa-commenting " style="font-size:18px;color:#85929E"></i><span class="tooltiptext"style="width:350px;"> Using the custom app tab, you can set up your own App ID and secret in the plugin. Login flow will not involve miniOrange in between. Login flow will go from plugin to social media application and then back to plugin.</span></div></td>
3188
  <td>Facebook, Twitter</td>
3189
- <td><div class="tooltip">10 Apps&nbsp <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Facebook Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Yahoo WordPress</span></div></td>
3190
- <td><div class="tooltip">13 Apps&nbsp <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Facebook Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Yahoo WordPress Disqus Pinterest Twitch</span></div></td>
3191
 
3192
  </tr>
3193
  <tr>
@@ -3264,6 +3267,12 @@ function mo_openid_pricing_info(){
3264
  <td><i class="fa fa-check"></i></td>
3265
  <td><i class="fa fa-check"></i></td>
3266
  </tr>
 
 
 
 
 
 
3267
  <tr>
3268
  <td>Woocommerce Display Options</td>
3269
  <?php if(!mo_openid_restrict_user()){?> <td><i class="fa fa-check"></i></td>
@@ -3278,12 +3287,6 @@ function mo_openid_pricing_info(){
3278
  <td><i class="fa fa-check"></i></td>
3279
  <td><i class="fa fa-check"></i></td>
3280
  </tr>
3281
- <tr>
3282
- <td>Account Linking</td>
3283
- <td>Basic</td>
3284
- <td>Advanced</td>
3285
- <td>Advanced</td>
3286
- </tr>
3287
  <tr>
3288
  <td>Email Notification to multiple admins</td>
3289
  <td></td>
@@ -3326,6 +3329,36 @@ function mo_openid_pricing_info(){
3326
  <td><i class="fa fa-check"></i></td>
3327
  <td><i class="fa fa-check"></i></td>
3328
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3329
  <tr>
3330
  <td><span class="tooltip">Custom attribute mapping <i class="fa fa-commenting" style="font-size:18px;color:#85929E"></i> <span class="tooltiptext"style="width:350px;">Extended attributes returned from social app are mapped to Custom attributes created by admin. These Attributes get stored in user_meta table.</span></div></td>
3331
  <td></td>
@@ -3440,8 +3473,8 @@ function mo_openid_troubleshoot_info(){ ?>
3440
  For any further queries, please submit a query on right hand side in our <b>Support Section</b>.
3441
  </div>
3442
  <hr>
3443
- </td></tr>
3444
-
3445
  <tr><td>
3446
  <h3><a id="openid_question_email" class="mo_openid_title_panel" >Change email</a></h3>
3447
  <div class="mo_openid_help_desc" hidden="" id="openid_question_email_desc">
@@ -3452,12 +3485,12 @@ function mo_openid_troubleshoot_info(){ ?>
3452
  For any further queries, please submit a query on right hand side in our <b>Support Section</b>.
3453
  </div>
3454
  <hr>
3455
- </td></tr>
3456
 
3457
- <tr><td>
3458
  <h3><a id="openid_question_curl" class="mo_openid_title_panel" >cURL</a></h3>
3459
  <div class="mo_openid_help_desc" hidden="" id="openid_question_curl_desc">
3460
-
3461
  <h4><a id="openid_question1" >How to enable PHP cURL extension? (Pre-requisite)</a></h4>
3462
  <div id="openid_question1_desc">
3463
  cURL is enabled by default but in case you have disabled it, follow the steps to enable it
@@ -3467,7 +3500,7 @@ function mo_openid_troubleshoot_info(){ ?>
3467
  <li>Restart the Apache Server.</li>
3468
  </ol>
3469
  For any further queries, please submit a query on right hand side in our <b>Support Section</b>.
3470
-
3471
  </div>
3472
  <hr>
3473
 
@@ -3475,12 +3508,12 @@ function mo_openid_troubleshoot_info(){ ?>
3475
  <div id="openid_question9_desc">
3476
  Just setsafe_mode = Off in your php.ini file (it's usually in /etc/ on the server). If that's already off, then look around for the open_basedir in the php.ini file, and change it to open_basedir = .
3477
  </div>
3478
-
3479
-
3480
  </div>
3481
  <hr>
3482
  </td></tr>
3483
-
3484
  <tr><td>
3485
  <h3><a id="openid_question_otp" class="mo_openid_title_panel" >OTP and Forgot Password</a></h3>
3486
  <div class="mo_openid_help_desc" hidden="" id="openid_question_otp_desc">
@@ -3489,47 +3522,47 @@ function mo_openid_troubleshoot_info(){ ?>
3489
  The OTP is sent as an email to your email address with which you have registered with miniOrange. If you can't see the email from miniOrange in your mails, please make sure to check your SPAM folder. <br/><br/>If you don't see an email even in SPAM folder, please verify your account using your mobile number. You will get an OTP on your mobile number which you need to enter on the page. If none of the above works, please contact us using the Support form on the right.
3490
  </div>
3491
  <hr>
3492
-
3493
  <h4><a id="openid_question8" >After entering OTP, I get Invalid OTP. What should I do?</a></h4>
3494
  <div id="openid_question8_desc">
3495
  Use the <b>Resend OTP</b> option to get an additional OTP. Plese make sure you did not enter the first OTP you recieved if you selected <b>Resend OTP</b> option to get an additional OTP. Enter the latest OTP since the previous ones expire once you click on Resend OTP. <br/><br/>If OTP sent on your email address are not working, please verify your account using your mobile number. You will get an OTP on your mobile number which you need to enter on the page. If none of the above works, please contact us using the Support form on the right.
3496
  </div>
3497
  <hr>
3498
-
3499
  <h4><a id="openid_question5" >I forgot the password of my miniOrange account. How can I reset it?</a></h4>
3500
  <div id="openid_question5_desc">
3501
  There are two cases according to the page you see -<br><br/>
3502
  1. <b>Login with miniOrange</b> screen: You should click on <b>forgot password</b> link. You will get your new password on your email address which you have registered with miniOrange . Now you can login with the new password.<br><br/>
3503
  2. <b>Register with miniOrange</b> screen: Enter your email ID and any random password in <b>password</b> and <b>confirm password</b> input box. This will redirect you to <b>Login with miniOrange</b> screen. Now follow first step.
3504
  </div>
3505
-
3506
  </div>
3507
  <hr>
3508
  </td></tr>
3509
-
3510
-
3511
  <tr><td>
3512
  <h3><a id="openid_question_login" class="mo_openid_title_panel" >Social Login</a></h3>
3513
  <div class="mo_openid_help_desc" hidden="" id="openid_question_login_desc">
3514
-
3515
  <h4><a id="openid_question2" >How to add login icons to frontend login page?</a></h4>
3516
  <div id="openid_question2_desc">
3517
  You can add social login icons to frontend login page using our shortcode [miniorange_social_login]. Refer to 'Shortcode' tab to add customizations to Shortcode.
3518
  </div>
3519
  <hr>
3520
-
3521
  <h4><a id="openid_question4" >How can I put social login icons on a page without using widgets?</a></h4>
3522
  <div id="openid_question4_desc">
3523
  You can add social login icons to any page or custom login page using 'social login shortcode' [miniorange_social_login]. Refer to 'Shortcode' tab to add customizations to Shortcode.
3524
  </div>
3525
  <hr>
3526
-
3527
  <h4><a id="openid_question12" >Social Login icons are not added to login/registration form.</a></h4>
3528
  <div id="openid_question12_desc">
3529
- Your login/registration form may not be wordpress's default login/registration form. In this case you can add social login icons to custom login/registration form using 'social login shortcode' [miniorange_social_login]. Refer to 'Shortcode' tab to add customizations to Shortcode.
3530
  </div>
3531
  <hr>
3532
-
3533
  <h4><a id="openid_question3" >How can I redirect to my blog page after login?</a></h4>
3534
  <div id="openid_question3_desc">
3535
  You can select one of the options from <b>Redirect URL after login</b> of <b>Display Option</b> section under <b>Social Login</b> tab. <br>
@@ -3539,7 +3572,7 @@ function mo_openid_troubleshoot_info(){ ?>
3539
  4. Custom URL - Example: https://www.example.com <br>
3540
  </div>
3541
  <hr>
3542
-
3543
  <?php if(get_option('mo_openid_oauth')!='1'){?>
3544
  <h4><a id="openid_question14">Can I configure my own apps for Facebook, Google+, Twitter etc.?</a></h4>
3545
  <div id="openid_question14_desc">
@@ -3548,10 +3581,10 @@ function mo_openid_troubleshoot_info(){ ?>
3548
  </div>
3549
  <hr>
3550
  <?php }?>
3551
-
3552
  <h4><a id="openid_question11" >After logout I am redirected to blank page</a></h4>
3553
  <div id="openid_question11_desc">
3554
- Your theme and Social Login plugin may conflict during logout. To resolve it you need to uncheck <b>Enable Logout Redirection</b> checkbox under <b>Display Option</b> of <b>Social Login</b> tab.
3555
  </div>
3556
  <hr>
3557
 
@@ -3561,27 +3594,27 @@ function mo_openid_troubleshoot_info(){ ?>
3561
  </div>
3562
  <hr>
3563
  <?php }?>
3564
-
3565
  <h4><a id="openid_question5" >My users get the following message -"Registration has been disabled for this site. Please contact your administrator." What should I do?</a></h4>
3566
  <div id="openid_question5_desc">
3567
- This means you must have unchecked the check-box of auto-register in the Social Login tab. Please check it. This will allow new users to be able to register to your site.
3568
  </div>
3569
  <hr>
3570
-
3571
  <h4><a id="openid_question7" >Why do my users get a message that it is not secure to proceed?</a></h4>
3572
  <div id="openid_question7_desc">Your website must be starting with http://. Now generally that's not an issue but our service uses https://( s stands for secure). You get a warning from the browser that the information is being passed insecurely. This happens after you log in to social media application and are coming back to your website. The warning is triggered from the browser since the data passes from https:// to http://, i.e. from a secure site to non-secure site.<br><br>We make sure that the information(email, name, username) getting passed from social media application to your website is encrypted with a key which is unique to you. So, even if the there is a warning of sending information without security, that information is encrypted. <br><br>
3573
 
3574
  <?php if(get_option('mo_openid_oauth')=='1') {?>
3575
  <strong>To remove this warning, you can add an SSL certificate to your website to change it to https OR use your own <a href="admin.php?page=mo_openid_settings&tab=custom_app"></strong>Custom App</a>
3576
-
3577
-
3578
  <?php } else {?>
3579
  <strong>To remove this warning, you can add an SSL certificate to your website to change it to https OR use your own custom app</strong>
3580
-
3581
  <?php }?>
3582
  </div>
3583
  <hr>
3584
-
3585
  <h4><a id="openid_question1" >My users get the following message -"There was an error in registration. Please contact your administrator." What should I do?</a></h4>
3586
  <div id="openid_question1_desc">
3587
  This message is thrown by WordPress when there is an error in user-registration. <br><br>
@@ -3600,13 +3633,13 @@ function mo_openid_troubleshoot_info(){ ?>
3600
  2.If you are making changes to an HTML file.<br/><br/>
3601
  Go to the HTML file which invokes your page/post and insert the following html snippet. Also, increase the margin-left value as per your requirement. Save the file. <br>
3602
  <code>&ltdiv style="margin-left:100px;"&gt <br>[miniorange_social_login]')<br>
3603
- &lt/div&gt </code>
3604
- </div>
3605
-
3606
  </div>
3607
  <hr>
3608
- </td></tr>
3609
-
3610
  <tr><td>
3611
  <h3><a id="openid_question_sharing" class="mo_openid_title_panel" >Social Sharing</a></h3>
3612
  <div class="mo_openid_help_desc" hidden="" id="openid_question_sharing_desc">
@@ -3615,7 +3648,7 @@ function mo_openid_troubleshoot_info(){ ?>
3615
  You can put social sharing icons before the content, after the content or both before and after the content. Go to <b>Sharing tab</b> , check <b>Blog post</b> checkbox and select one of three(before, after, both) options available. Save settings.
3616
  </div>
3617
  <hr>
3618
-
3619
  <h4><a id="openid_question10" >Why is sharing with some applications not working?</a></h4>
3620
  <div id="openid_question10_desc">
3621
  This issue arises if your website is not publicly hosted. Facebook, for example looks for the URL to generate its preview for sharing. That does not work on localhost or any privately hosted URL.
@@ -3632,7 +3665,7 @@ function mo_openid_troubleshoot_info(){ ?>
3632
  If the problem still persists, please contact us using the Support form on the right.
3633
  </div>
3634
  <hr>
3635
-
3636
  <h4><a id="openid_question21" >There is no option of Instagram in Social Sharing. Why?</a></h4>
3637
  <div id="openid_question21_desc">
3638
  Instagram has made a conscious effort to not allow sharing from external sources to fight spam and low quality photos.
@@ -3640,13 +3673,13 @@ function mo_openid_troubleshoot_info(){ ?>
3640
  <a href='https://help.instagram.com/158826297591430' target='_blank'>https://help.instagram.com/158826297591430</a>
3641
  </div>
3642
  <hr>
3643
-
3644
  <h4><a id="openid_question18" >Email share is not working. Why?</a></h4>
3645
  <div id="openid_question18_desc">
3646
  Email share in the plugin is enabled through <b>mailto</b>. mailto is generally configured through desktop or browser so if it is not working, mailto is not setup or improperly configured.<br><br>
3647
  To set it up properly, search for "mailto settings " followed by your Operating System's name where you have your browser installed.
3648
  </div>
3649
- <hr>
3650
 
3651
  <h4><a id="openid_question19" >I cannot see some icons in preview or on blog even though I have selected them in the plugin settings.</a></h4>
3652
  <div id="openid_question19_desc">
@@ -3654,7 +3687,7 @@ function mo_openid_troubleshoot_info(){ ?>
3654
  <br/><br/>
3655
  If you don't have Adblock installed and still face this issue, please contact us using the Support form on the right or mail us at info@xecurify.com.
3656
  </div>
3657
-
3658
  </div>
3659
  <hr>
3660
  </td></tr>
@@ -4172,6 +4205,327 @@ function mo_custom_app_instructions($appname){
4172
 
4173
  }
4174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4175
  function mo_openid_is_customer_registered() {
4176
  $email = get_option('mo_openid_admin_email');
4177
  $customerKey = get_option('mo_openid_admin_customer_key');
@@ -4182,6 +4536,17 @@ function mo_openid_is_customer_registered() {
4182
  }
4183
  }
4184
 
 
 
 
 
 
 
 
 
 
 
 
4185
  function miniorange_openid_support(){
4186
  global $current_user;
4187
  $current_user = wp_get_current_user();
@@ -4306,7 +4671,6 @@ function mo_openid_registeration_modal(){
4306
  update_option ( 'mo_openid_new_registration', 'true' );
4307
  global $current_user;
4308
 
4309
-
4310
  $current_user = wp_get_current_user();
4311
  ?><div id="request_registeration" class="mo_openid_modal" style="height:100%">
4312
  <!-- Modal content -->
@@ -4317,7 +4681,7 @@ function mo_openid_registeration_modal(){
4317
  <h1>Save As</h1>
4318
  </div>
4319
  <br>
4320
- <span id="msg1" style="text-align: center;color: #56b11e"><?php echo esc_html(get_option("pop_regi_msg")); update_option('pop_regi_msg','Your settings are saved successfully. Please enter your valid email address to enable social login.');?></span>
4321
  <br>
4322
  <br>
4323
  <br>
@@ -4343,140 +4707,44 @@ function mo_openid_registeration_modal(){
4343
  </td>
4344
  </tr>
4345
 
4346
- <tr id="pop_register" style="display: none">
4347
- <td><b><font color="#FF0000">*</font>Website/Company Name:</b></td>
4348
- <td><input class="mo_openid_table_textbox" name="company"
4349
- style="width: 100%" required placeholder="Enter website or company name"
4350
- value="localhost" type="text" /></td>
4351
- </tr>
4352
-
4353
- <tr id="pop_register" style="display: none">
4354
  <td><b><font color="#FF0000">*</font>Password:</b></td>
4355
  <td><input class="mo_openid_table_textbox" required name="password"
4356
  style="width: 100%" placeholder="Choose your password (Min. length 6)"
4357
  type="password" /></td>
4358
  </tr>
4359
- <tr id="pop_register" style="display: none">
4360
  <td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
4361
  <td><input class="mo_openid_table_textbox" required name="confirmPassword"
4362
  style="width: 100%" placeholder="Confirm your password"
4363
  type="password" /></td>
4364
  </tr>
4365
- <tr style="text-align: center">
4366
- <td>
4367
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
4368
-
4369
- </td>
4370
-
4371
- </tr>
4372
- <tr><td><input id="pop_next" class="button button-primary button-large" style="float: right; margin-right: -54%;" value=" Next Step" onclick="show_pass()" type="button" />
4373
- </td></tr>
4374
 
4375
  </tbody></table>
4376
- <input value="Submit" id="register_submit" style="display:none;margin-right: 21%;" class="button button-primary button-large" type="submit">
 
 
4377
  </div>
4378
  </form>
4379
- <form method="post"> &nbsp; &nbsp; &nbsp; <input id="pop_next" name="show_login" value="Existing Account" class="button button-primary button-large" style="margin-left: 31%; margin-top: -9.2%;" type="submit"> <input id="pop_register" name="show_login" value="Existing Account" class="button button-primary button-large" style="display: none;margin-top: -8.5%; float: right; margin-right:22%; " type="submit">
4380
- </form>
4381
-
4382
- </div>
4383
- </div>
4384
-
4385
- </div>
4386
-
4387
- <script>
4388
- function show_pass(){
4389
- var regi_button = document.getElementById('register_submit').style;
4390
- regi_button.display = '';
4391
-
4392
- jQuery("[id*=pop_next]").css('display','none');
4393
- document.getElementById("msg1").innerHTML = "Please select and enter a password";
4394
- jQuery("[id*=pop_register]").css('display',''); //and $('#Id').css('padding-left','20%');
4395
- }
4396
- </script>
4397
- <?php
4398
- }
4399
-
4400
- function mo_pop_show_otp_verification($msg){
4401
- global $current_user;
4402
- $current_user = wp_get_current_user();
4403
- update_option('regi_pop_up','yes');
4404
-
4405
- ?>
4406
- <div id="request_registeration" class="mo_openid_modal" style="height:100%">
4407
- <!-- Modal content -->
4408
- <div class="mo_openid_modal-content" style="text-align:center;margin-left: 32%;margin-top: 2%;width: 37%;">
4409
- <div class="modal-head">
4410
- <!-- <span class="mo_close">&times;</span>-->
4411
- <a href="" class="mo_close" id="mo_close" style="text-decoration:none;margin-top: 3%;">&times;</a>
4412
- <h1>Verify Your Email </h1>
4413
- </div>
4414
- <br>
4415
- <span style="text-align: center;color: #56b11e"><?php echo esc_html($msg);?></span>
4416
- <br>
4417
- <br>
4418
- <div id="mo_saml_show_registeration_modal" >
4419
-
4420
- <!--Register with miniOrange-->
4421
-
4422
-
4423
- <form name="f" method="post" action="" id="pop-otp-form" style="margin-left: 28%;">
4424
- <input type="hidden" name="option" value="mo_openid_validate_otp" />
4425
- <input type="hidden" name="mo_openid_validate_otp_nonce"
4426
- value="<?php echo wp_create_nonce( 'mo-openid-validate-otp-nonce' ); ?>"/>
4427
- <div>
4428
-
4429
- <table style="text-align: left;width: 100%">
4430
- <tr>
4431
- <td><b><font color="#FF0000">*</font>Enter OTP:</b></td>
4432
-
4433
- <td><input class="mo_openid_table_textbox" autofocus="true" type="text" name="otp_token" required placeholder="Enter OTP" style="margin-left: -10%;width:45%;" />
4434
-
4435
- </td>
4436
-
4437
- </tr>
4438
- <tr style="text-align: center">
4439
- <td>
4440
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
4441
- </td>
4442
 
4443
- </tr>
4444
- </table>
4445
- <input type="submit" value="Submit" id="otp_submit" style="margin-left: -71%;"class="button button-primary button-large" onclick="subotp()"/>
4446
 
4447
  </form>
4448
 
4449
- </form>
4450
- <form method="post">
4451
- &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp <input type="submit" id="go_to_register" name="go_to_register" value="Back to register" class="button button-primary button-large" style="margin-left: -29%;margin-top: -8.2%;">
4452
- </form>
4453
 
4454
  </div>
4455
- <div style="margin-left: 14%;"><form name="f" id="pop_resend_otp_form" method="post" action="">
4456
- <input type="hidden" name="option" value="mo_openid_resend_otp"/>
4457
- <input type="hidden" name="mo_openid_resend_otp_nonce"
4458
- value="<?php echo wp_create_nonce( 'mo-openid-resend-otp-nonce' ); ?>"/>
4459
- &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp <input type="submit" value="Did not get the OTP? Resend OTP" id="resend_otp" style="cursor:pointer ;background: none!important;border:none;padding:0!important;margin-left: -29%;margin-top: -8.2%;color: darkblue;""/>
4460
- </form></div>
4461
  </div>
4462
 
4463
  </div>
4464
 
4465
- </div>
4466
- <script>
4467
- function subotp() {
4468
- jQuery('#otp_submit').click(function() {
4469
- jQuery('#pop-otp-form').submit();
4470
- })
4471
- }
4472
-
4473
- </script>
4474
  <?php
4475
  }
4476
 
4477
  function mo_pop_show_verify_password_page() {
4478
- update_option('regi_pop_up','yes');
4479
- ?>
4480
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
4481
  <div id="request_registeration" class="mo_openid_modal" style="height:100%">
4482
 
@@ -4487,15 +4755,15 @@ function mo_pop_show_verify_password_page() {
4487
  <h1>Login</h1>
4488
  </div>
4489
  <br>
4490
- <span style="text-align: center;color: #56b11e"><?php echo esc_html(get_option("pop_login_msg")); update_option('pop_login_msg','Enter Your Login Credentials.');?></span>
4491
  <br><br>
4492
  <div id="mo_saml_show_registeration_modal" >
4493
 
4494
  <!--Register with miniOrange-->
4495
  <form name="f" method="post" action="" id="pop-register-form">
4496
  <input type="hidden" name="option" value="mo_openid_connect_verify_customer" />
4497
- <input type="hidden" name="mo_openid_connect_verify_nonce"
4498
- value="<?php echo wp_create_nonce( 'mo-openid-connect-verify-nonce' ); ?>"/>
4499
  <div>
4500
  <table style="text-align: left;width: 100%">
4501
 
@@ -4522,14 +4790,14 @@ function mo_pop_show_verify_password_page() {
4522
  <input type="submit" value="Login" id="login_submit" style="margin-left: -21%;margin-top: -1%;" class="button button-primary button-large" "/>
4523
  </div>
4524
  </form>
4525
- &nbsp &nbsp &nbsp <form method="post" style="margin-top: -16.3%;margin-left: 46%;">
4526
  <input type="submit" id="go_to_register" name="go_to_register" value="Register" class="button button-primary button-large" style="margin-left: -67%;margin-top: 7.8%;">
4527
  </form>
4528
  <p><b><a href="#forgot_password">Click here if you forgot your password?</a></b></p>
4529
  <form name="forgotpassword" method="post" action="" id="openidforgotpasswordform">
4530
  <input type="hidden" name="option" value="mo_openid_forgot_password"/>
4531
- <input type="hidden" name="mo_openid_forgot_password_nonce"
4532
- value="<?php echo wp_create_nonce( 'mo-openid-forgot-password-nonce' ); ?>"/>
4533
  <input type="hidden" id="forgot_pass_email" name="email" value=""/>
4534
  </form>
4535
  </div>
@@ -4544,8 +4812,9 @@ function mo_pop_show_verify_password_page() {
4544
  jQuery('#openidforgotpasswordform').submit();
4545
  });
4546
  </script>
4547
- <?php
4548
  }
 
4549
  function is_custom_app($app_name){
4550
 
4551
  if(get_option('mo_openid_apps_list'))
4
 
5
  if(get_option('mo_openid_social_comment_google') == 1){
6
  ?>
7
+ <div id="upgrade_notice" class="update-nag" style="width: 92.5%;margin-left: 0%;"><strong>Google+ APIs will be shut down soon on March 7, 2019. So please disable the Google+ commenting option from<a href="<?php echo site_url();?>/wp-admin/admin.php?page=mo_openid_settings&tab=comment " ><b>Social Comments</b></a> tab.</strong></div>
8
  <?php }
9
  if( isset( $_GET[ 'tab' ]) && $_GET[ 'tab' ] !== 'register' ) {
10
  $active_tab = $_GET[ 'tab' ];
29
  <td> &nbsp;&nbsp;&nbsp;&nbsp; <a id="pricing" style="margin-top: 23px" class="button"<?php echo $active_tab == 'pricing' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'pricing'), $_SERVER['REQUEST_URI'] ); ?>">Licensing Plans</a>
30
  </td> <td>&nbsp; <a id="privacy" style="margin-top: 23px" class="button" <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'privacy_policy'), $_SERVER['REQUEST_URI'] ); ?>">Privacy Policy</a>
31
  </td> <td> &nbsp; <a id="faq" style="margin-top: 23px" class="button" <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'help'), $_SERVER['REQUEST_URI'] ); ?>">FAQ</a>
32
+ </td><td> &nbsp<a id="addon" style="margin-top: 23px;background: #FFA335;color: white;" class="button" <?php echo $active_tab == 'addon' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'addon'), $_SERVER['REQUEST_URI'] ); ?>">Add On</a>
33
+ </td>
34
+ </tr> </table>
35
  </div>
36
  <div id="tab">
37
  <h2 class="nav-tab-wrapper">
60
  content: "Enable one click login to your website using various Social Login applications.",
61
  backdrop:'body',
62
  backdropPadding:'6',
63
+
64
+ },
65
+ {
66
+ element: "#addon",
67
+ title: "Add Ons",
68
+ content: "Introduced a new Add On which helps to store and update user's extra information during registration through social login.",
69
+ backdrop:'body',
70
+ backdropPadding:'6',
71
  onNext: function() {
72
  window.location = base_url+'/wp-admin/admin.php?page=mo_openid_settings&tab=custom_app'
73
  }
74
+
75
  },{
76
  element: "#custom_app",
77
  title: "Custom App",
134
  ],
135
  template: function () {
136
  return (
137
+ tour1.getCurrentStep()===7 // Is this the last step?
138
+ ? "<div class=\"mo2f_popover\" role=\"tooltip\"> <div class=\"mo2f_arrow\" ></div> <h3 class=\"mo2f_popover-header\" style=\"margin-top:10%;\"></h3> <div class=\"mo2f_popover-body\"></div> <div class=\"mo2f_popover-navigation\"> <div class=\"mo2f_tour_btn-group\"><div style=\"width:47%;margin-top: -7%;\"><h4 style=\"float:left;margin-top:30%;margin-left:30%;\">"+ (tour1.getCurrentStep()+1)+"/8</h4></div></div>&nbsp;&nbsp; <button class=\"button button-primary button-large\" data-role=\"end\" onclick=\"end_tour1();\">Done</button> </div> </div>"
139
+ : "<div class=\"mo2f_popover\" role=\"tooltip\"> <div class=\"mo2f_arrow\" ></div> <h3 class=\"mo2f_popover-header\" style=\"margin-top:0px;\"></h3> <div class=\"mo2f_popover-body\"></div> <div class=\"mo2f_popover-navigation\"> <div class=\"mo2f_tour_btn-group\" style=\"width: 100%;\"> <button class=\"mo2f_tour_btn mo2f_tour_btn-sm mo2f_tour_btn-secondary mo2f_tour_btn_next-success\" style=\"width: 32%;height: 0%;\" data-role=\"next\">Next &raquo;</button><div style=\"width:47%;margin-top: -7%;\"><h4 style=\"float:right;margin-left: 53%;\">"+ (tour1.getCurrentStep()+1)+"/8</h4></div></div></div></div>"
140
  );
141
  }
142
  });
211
  } else if($active_tab == 'pricing') {
212
  mo_openid_pricing_info();
213
  } else if($active_tab == 'help') {
214
+ mo_openid_troubleshoot_info();
215
+ } else if($active_tab == 'addon') {
216
+ header('Location: '.site_url().'/wp-admin/admin.php?page=mo_openid_settings_addOn');
217
  } else if($active_tab == 'privacy_policy'){
218
  mo_openid_privacy_policy();
219
  }
236
  <?php
237
  }
238
 
239
+ function mo_register_openid_addon() {
240
+ if( isset( $_GET[ 'tab' ]) && $_GET[ 'tab' ] !== 'register' ) {
241
+ $active_tab = $_GET[ 'tab' ];
242
+ } else if(mo_openid_is_customer_registered()) {
243
+ $active_tab = 'customization';
244
+ } else {
245
+ $active_tab = 'register';
246
+ }
247
+ if(mo_openid_is_curl_installed()==0){ ?>
248
+ <p style="color:red;">(Warning: <a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP CURL extension</a> is not installed or disabled) Please go to Troubleshooting for steps to enable curl.</p>
249
+ <?php
250
+ }?>
251
+ <div >
252
+ <table>
253
+ <tr><td>
254
+
255
+ <img id="logo" style="margin-top: 25px" src="<?php echo plugin_dir_url(__FILE__);?>includes/images/logo.png">
256
+ </td> <td>&nbsp;<a style="text-decoration:none" href="https://www.miniorange.com/social-login-social-sharing/" target="_blank"><h1 style="color: #c9302c">miniOrange Social Login Add-on</h1></a></td>
257
+ <td> &nbsp;&nbsp;&nbsp;&nbsp; <a id="pricing" style="margin-top: 23px" class="button"<?php echo $active_tab == 'pricing' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'pricing'), $_SERVER['REQUEST_URI'] ); ?>">Licensing Plans</a>
258
+ </td> <td>&nbsp; <a id="privacy" style="margin-top: 23px" class="button" <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'privacy_policy'), $_SERVER['REQUEST_URI'] ); ?>">Privacy Policy</a>
259
+ </td> <td> &nbsp; <a id="faq" style="margin-top: 23px" class="button" <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'help'), $_SERVER['REQUEST_URI'] ); ?>">FAQ</a>
260
+ </td></tr> </table>
261
+ </div>
262
+ <div id="tab">
263
+ <h2 class="nav-tab-wrapper">
264
+ <a id="social_login" class="nav-tab <?php echo $active_tab == 'customization' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'customization'), $_SERVER['REQUEST_URI'] ); ?>">Integration Add-on</a>
265
+
266
+ <?php if(!mo_openid_is_customer_registered()) { ?>
267
+ <a class="nav-tab <?php echo $active_tab == 'register' ? 'nav-tab-active' : ''; ?>" href="<?php echo add_query_arg( array('tab' => 'register'), $_SERVER['REQUEST_URI'] ); ?>">Account Setup</a>
268
+ <?php } ?>
269
+ </h2>
270
+ </div>
271
+
272
+ <div id="mo_openid_settings">
273
+ <div class="mo_container">
274
+ <div id="mo_openid_msgs"></div>
275
+ <table style="width:100%;">
276
+ <tr>
277
+ <td style="vertical-align:top;">
278
+ <?php
279
+ if($active_tab == 'pricing') {
280
+ mo_openid_pricing_info();
281
+ }
282
+ else if($active_tab == 'help') {
283
+ mo_openid_troubleshoot_info();
284
+ }
285
+ else if($active_tab == 'privacy_policy'){
286
+ mo_openid_privacy_policy();
287
+ }
288
+ else if($active_tab == 'customization'){
289
+ if(mo_openid_is_customer_registered() && mo_openid_is_customer_addon_license_key_verified()) {
290
+ if(is_plugin_active('miniorange-login-openid-extra-attributes-addon/miniorange_openid_sso_customization_addon.php'))
291
+ do_action('customization_addon');
292
+ else {
293
+ mo_openid_show_addon_message_page();
294
+ }
295
+ }
296
+ else
297
+ mo_openid_addon();
298
+ }
299
+ else if ( $active_tab == 'register') {
300
+ mo_openid_show_verify_password_page();
301
+ }
302
+ ?>
303
+ </td>
304
+ </tr>
305
+ </table>
306
+ <?php
307
+ }
308
+
309
  function mo_openid_show_new_registration_page() {
310
  update_option('regi_pop_up','no');
311
  update_option ( 'mo_openid_new_registration', 'true' );
332
  required placeholder="person@example.com"
333
  value="<?php echo esc_attr($current_user->user_email);?>" /></td>
334
  </tr>
 
 
 
 
 
 
335
  <tr>
336
  <td><b><font color="#FF0000">*</font>Password:</b></td>
337
  <td><input class="mo_openid_table_textbox" required type="password"
344
  </tr>
345
  <tr>
346
  <td>&nbsp;</td>
347
+ <td><br /><input type="submit" name="submit" value="Submit" style="width:100px;"
348
  class="button button-primary button-large" />
349
  <input type="button" value="Login Page" id="mo_openid_go_back_registration" style="width:150px;"
350
  class="button button-primary button-large" />
351
  </td>
352
  </tr>
353
  </table>
354
+ <br/>By clicking Submit, you agree to our <a href="https://www.miniorange.com/usecases/miniOrange_Privacy_Policy.pdf" target="_blank">Privacy Policy</a> and <a href="https://www.miniorange.com/usecases/miniOrange_User_Agreement.pdf" target="_blank">User Agreement</a>.
355
  </div>
356
  </form>
357
  <form name="f" method="post" action="" id="openidgobackloginform">
444
  <input type="hidden" name="option" value="mo_openid_enable_apps" />
445
  <input type="hidden" name="mo_openid_enable_apps_nonce"
446
  value="<?php echo wp_create_nonce( 'mo-openid-enable-apps-nonce' ); ?>"/>
 
447
  <div class="mo_openid_table_layout">
 
 
448
  <table>
449
  <tr>
450
  <td colspan="2">
451
  <h3>Social Login
452
+ <input type="submit" name="submit" id="save_opt" value="Save" style="float:right; margin-right:2%; margin-top: -3px;width:100px;" class="button button-primary button-large" onclick="end_tour();" /> <button type="button" id="mo_openid_restart_tour" class="button button-primary button-large" style="float:right; margin-right:2%; margin-top: -3px;width:20%" onclick="restart_tour();"><i class="fa fa-refresh"></i> Social Login Tour</button>
453
  </h3>
454
  <b>Select applications to enable login for your users. Customize your login icons using a range of shapes, themes and sizes. You can choose different places to display these icons and also customize redirect URL after login.</b>
455
  </td>
 
456
  </tr>
457
  </table>
 
458
  <table>
459
+ <tr id="select_app"><td><table style="width: 100%">
460
+ <h3>Select Apps</h3>
461
  <h4>Select Default Apps:</h4>
462
 
463
  <tr >
512
  </tr>
513
  <tr><td><h4>Setup Custom Apps:</h4></td>
514
  </tr>
515
+ <tr>
516
+ <td>
517
+ <div>
518
  <input type="checkbox" id="facebook_enable" class="app_enable tooltip" name="mo_openid_facebook_enable" value="1" <?php $x=is_custom_app('facebook');echo "onchange='previewLoginIcons(),redirectto_custom_tab(".$x.")'";?>
519
  <?php checked( get_option('mo_openid_facebook_enable') == 1 );?> /><strong> Facebook </strong>
520
+ &nbsp &nbsp &nbsp&nbsp &nbsp&nbsp &nbsp&nbsp &nbsp <input type="checkbox" class="app_enable" disabled="disabled" /><strong><span style="color: red">*</span>Disqus</strong>
521
+ &nbsp &nbsp &nbsp&nbsp &nbsp&nbsp &nbsp <input type="checkbox" class="app_enable" disabled="disabled" /><strong><span style="color: red">*</span>Vimeo</strong>
522
+ &nbsp &nbsp &nbsp&nbsp &nbsp&nbsp &nbsp <input type="checkbox" class="app_enable" disabled="disabled" /><strong><span style="color: red">*</span>Kakao</strong>
523
  </div>
524
+ </td>
525
  </tr>
526
  </table></td></tr>
527
  <tr>
1600
  </tr>
1601
  </table>
1602
  </div>
1603
+ </td>
1604
+ <tr>
1605
+ <td>
1606
+ <br>
1607
+ <h3><span style="color:red;">* </span>Recaptcha Support</h3>
1608
+ &nbsp&nbsp&nbsp<input type="checkbox" disabled <b>Enable recaptcha</b>
1609
+ </td>
1610
+ </tr>
1611
  <tr>
1612
  <td>
1613
  <br>
1614
+ <hr>
1615
  <h3><span style="color:red;">* </span>Account Linking</h3>
1616
  </td>
1617
  </tr>
2094
  <?php
2095
  }
2096
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2097
  function mo_openid_other_settings(){
2098
 
2099
  ?>
2378
  </div>
2379
 
2380
  </td>
2381
+ </tr>
2382
+
2383
+ </table>
2384
+ </td></tr>
2385
 
2386
  <script>
2387
  var tempHorSize = '<?php echo esc_attr(get_option('mo_sharing_icon_custom_size')) ?>';
3083
  <b>space</b>: Any value between 0 to 50<br>
3084
  <b>url</b>: Enter custom URL for sharing<br>
3085
  <b>fontcolor</b>: Enter custom color for icons (only works with no background theme)<br>
3086
+ <h4 style="margin-bottom:0 !important">Horizontal attributes</h4>
3087
  <b>heading</b>: Enter custom heading text<br>
3088
  <b>color</b>: Enter custom text color for heading eg: cyan, red, blue, orange, yellow <br>
3089
  <br>
3189
  <tr>
3190
  <td><div class="tooltip">Custom Social Login Apps <i class="fa fa-commenting " style="font-size:18px;color:#85929E"></i><span class="tooltiptext"style="width:350px;"> Using the custom app tab, you can set up your own App ID and secret in the plugin. Login flow will not involve miniOrange in between. Login flow will go from plugin to social media application and then back to plugin.</span></div></td>
3191
  <td>Facebook, Twitter</td>
3192
+ <td><div class="tooltip">15 Apps&nbsp <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Facebook Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Yahoo WordPress Disqus Pinterest Twitch Vimeo Kakao</span></div></td>
3193
+ <td><div class="tooltip">15 Apps&nbsp <i class="fa fa-bookmark " style="font-size:18px;color:#85929E"></i><span class="tooltiptext1" style="width:83px;"> Facebook Google Twitter Vkontakte LinkedIn Windows Live Amazon Instagram Yahoo WordPress Disqus Pinterest Twitch Vimeo Kakao</span></div></td>
3194
 
3195
  </tr>
3196
  <tr>
3267
  <td><i class="fa fa-check"></i></td>
3268
  <td><i class="fa fa-check"></i></td>
3269
  </tr>
3270
+ <tr>
3271
+ <td>Account Linking</td>
3272
+ <td>Basic</td>
3273
+ <td>Advanced</td>
3274
+ <td>Advanced</td>
3275
+ </tr>
3276
  <tr>
3277
  <td>Woocommerce Display Options</td>
3278
  <?php if(!mo_openid_restrict_user()){?> <td><i class="fa fa-check"></i></td>
3287
  <td><i class="fa fa-check"></i></td>
3288
  <td><i class="fa fa-check"></i></td>
3289
  </tr>
 
 
 
 
 
 
3290
  <tr>
3291
  <td>Email Notification to multiple admins</td>
3292
  <td></td>
3329
  <td><i class="fa fa-check"></i></td>
3330
  <td><i class="fa fa-check"></i></td>
3331
  </tr>
3332
+ <tr>
3333
+ <td >Force Admin To Login Using Password </td>
3334
+ <td></td>
3335
+ <td><i class="fa fa-check"></i></td>
3336
+ <td><i class="fa fa-check"></i></td>
3337
+ </tr>
3338
+ <tr>
3339
+ <td >Recaptcha Support </td>
3340
+ <td></td>
3341
+ <td><i class="fa fa-check"></i></td>
3342
+ <td><i class="fa fa-check"></i></td>
3343
+ </tr>
3344
+ <tr>
3345
+ <td>User Moderation </td>
3346
+ <td></td>
3347
+ <td></td>
3348
+ <td><i class="fa fa-check"></i></td>
3349
+ </tr>
3350
+ <tr>
3351
+ <td>Account Unlinking </td>
3352
+ <td></td>
3353
+ <td></td>
3354
+ <td><i class="fa fa-check"></i></td>
3355
+ </tr>
3356
+ <tr>
3357
+ <td>Paid Membership Pro Plugin Integration</td>
3358
+ <td></td>
3359
+ <td></td>
3360
+ <td><i class="fa fa-check"></i></td>
3361
+ </tr>
3362
  <tr>
3363
  <td><span class="tooltip">Custom attribute mapping <i class="fa fa-commenting" style="font-size:18px;color:#85929E"></i> <span class="tooltiptext"style="width:350px;">Extended attributes returned from social app are mapped to Custom attributes created by admin. These Attributes get stored in user_meta table.</span></div></td>
3364
  <td></td>
3473
  For any further queries, please submit a query on right hand side in our <b>Support Section</b>.
3474
  </div>
3475
  <hr>
3476
+ </td></tr>
3477
+
3478
  <tr><td>
3479
  <h3><a id="openid_question_email" class="mo_openid_title_panel" >Change email</a></h3>
3480
  <div class="mo_openid_help_desc" hidden="" id="openid_question_email_desc">
3485
  For any further queries, please submit a query on right hand side in our <b>Support Section</b>.
3486
  </div>
3487
  <hr>
3488
+ </td></tr>
3489
 
3490
+ <tr><td>
3491
  <h3><a id="openid_question_curl" class="mo_openid_title_panel" >cURL</a></h3>
3492
  <div class="mo_openid_help_desc" hidden="" id="openid_question_curl_desc">
3493
+
3494
  <h4><a id="openid_question1" >How to enable PHP cURL extension? (Pre-requisite)</a></h4>
3495
  <div id="openid_question1_desc">
3496
  cURL is enabled by default but in case you have disabled it, follow the steps to enable it
3500
  <li>Restart the Apache Server.</li>
3501
  </ol>
3502
  For any further queries, please submit a query on right hand side in our <b>Support Section</b>.
3503
+
3504
  </div>
3505
  <hr>
3506
 
3508
  <div id="openid_question9_desc">
3509
  Just setsafe_mode = Off in your php.ini file (it's usually in /etc/ on the server). If that's already off, then look around for the open_basedir in the php.ini file, and change it to open_basedir = .
3510
  </div>
3511
+
3512
+
3513
  </div>
3514
  <hr>
3515
  </td></tr>
3516
+
3517
  <tr><td>
3518
  <h3><a id="openid_question_otp" class="mo_openid_title_panel" >OTP and Forgot Password</a></h3>
3519
  <div class="mo_openid_help_desc" hidden="" id="openid_question_otp_desc">
3522
  The OTP is sent as an email to your email address with which you have registered with miniOrange. If you can't see the email from miniOrange in your mails, please make sure to check your SPAM folder. <br/><br/>If you don't see an email even in SPAM folder, please verify your account using your mobile number. You will get an OTP on your mobile number which you need to enter on the page. If none of the above works, please contact us using the Support form on the right.
3523
  </div>
3524
  <hr>
3525
+
3526
  <h4><a id="openid_question8" >After entering OTP, I get Invalid OTP. What should I do?</a></h4>
3527
  <div id="openid_question8_desc">
3528
  Use the <b>Resend OTP</b> option to get an additional OTP. Plese make sure you did not enter the first OTP you recieved if you selected <b>Resend OTP</b> option to get an additional OTP. Enter the latest OTP since the previous ones expire once you click on Resend OTP. <br/><br/>If OTP sent on your email address are not working, please verify your account using your mobile number. You will get an OTP on your mobile number which you need to enter on the page. If none of the above works, please contact us using the Support form on the right.
3529
  </div>
3530
  <hr>
3531
+
3532
  <h4><a id="openid_question5" >I forgot the password of my miniOrange account. How can I reset it?</a></h4>
3533
  <div id="openid_question5_desc">
3534
  There are two cases according to the page you see -<br><br/>
3535
  1. <b>Login with miniOrange</b> screen: You should click on <b>forgot password</b> link. You will get your new password on your email address which you have registered with miniOrange . Now you can login with the new password.<br><br/>
3536
  2. <b>Register with miniOrange</b> screen: Enter your email ID and any random password in <b>password</b> and <b>confirm password</b> input box. This will redirect you to <b>Login with miniOrange</b> screen. Now follow first step.
3537
  </div>
3538
+
3539
  </div>
3540
  <hr>
3541
  </td></tr>
3542
+
3543
+
3544
  <tr><td>
3545
  <h3><a id="openid_question_login" class="mo_openid_title_panel" >Social Login</a></h3>
3546
  <div class="mo_openid_help_desc" hidden="" id="openid_question_login_desc">
3547
+
3548
  <h4><a id="openid_question2" >How to add login icons to frontend login page?</a></h4>
3549
  <div id="openid_question2_desc">
3550
  You can add social login icons to frontend login page using our shortcode [miniorange_social_login]. Refer to 'Shortcode' tab to add customizations to Shortcode.
3551
  </div>
3552
  <hr>
3553
+
3554
  <h4><a id="openid_question4" >How can I put social login icons on a page without using widgets?</a></h4>
3555
  <div id="openid_question4_desc">
3556
  You can add social login icons to any page or custom login page using 'social login shortcode' [miniorange_social_login]. Refer to 'Shortcode' tab to add customizations to Shortcode.
3557
  </div>
3558
  <hr>
3559
+
3560
  <h4><a id="openid_question12" >Social Login icons are not added to login/registration form.</a></h4>
3561
  <div id="openid_question12_desc">
3562
+ Your login/registration form may not be wordpress's default login/registration form. In this case you can add social login icons to custom login/registration form using 'social login shortcode' [miniorange_social_login]. Refer to 'Shortcode' tab to add customizations to Shortcode.
3563
  </div>
3564
  <hr>
3565
+
3566
  <h4><a id="openid_question3" >How can I redirect to my blog page after login?</a></h4>
3567
  <div id="openid_question3_desc">
3568
  You can select one of the options from <b>Redirect URL after login</b> of <b>Display Option</b> section under <b>Social Login</b> tab. <br>
3572
  4. Custom URL - Example: https://www.example.com <br>
3573
  </div>
3574
  <hr>
3575
+
3576
  <?php if(get_option('mo_openid_oauth')!='1'){?>
3577
  <h4><a id="openid_question14">Can I configure my own apps for Facebook, Google+, Twitter etc.?</a></h4>
3578
  <div id="openid_question14_desc">
3581
  </div>
3582
  <hr>
3583
  <?php }?>
3584
+
3585
  <h4><a id="openid_question11" >After logout I am redirected to blank page</a></h4>
3586
  <div id="openid_question11_desc">
3587
+ Your theme and Social Login plugin may conflict during logout. To resolve it you need to uncheck <b>Enable Logout Redirection</b> checkbox under <b>Display Option</b> of <b>Social Login</b> tab.
3588
  </div>
3589
  <hr>
3590
 
3594
  </div>
3595
  <hr>
3596
  <?php }?>
3597
+
3598
  <h4><a id="openid_question5" >My users get the following message -"Registration has been disabled for this site. Please contact your administrator." What should I do?</a></h4>
3599
  <div id="openid_question5_desc">
3600
+ This means you must have unchecked the check-box of auto-register in the Social Login tab. Please check it. This will allow new users to be able to register to your site.
3601
  </div>
3602
  <hr>
3603
+
3604
  <h4><a id="openid_question7" >Why do my users get a message that it is not secure to proceed?</a></h4>
3605
  <div id="openid_question7_desc">Your website must be starting with http://. Now generally that's not an issue but our service uses https://( s stands for secure). You get a warning from the browser that the information is being passed insecurely. This happens after you log in to social media application and are coming back to your website. The warning is triggered from the browser since the data passes from https:// to http://, i.e. from a secure site to non-secure site.<br><br>We make sure that the information(email, name, username) getting passed from social media application to your website is encrypted with a key which is unique to you. So, even if the there is a warning of sending information without security, that information is encrypted. <br><br>
3606
 
3607
  <?php if(get_option('mo_openid_oauth')=='1') {?>
3608
  <strong>To remove this warning, you can add an SSL certificate to your website to change it to https OR use your own <a href="admin.php?page=mo_openid_settings&tab=custom_app"></strong>Custom App</a>
3609
+
3610
+
3611
  <?php } else {?>
3612
  <strong>To remove this warning, you can add an SSL certificate to your website to change it to https OR use your own custom app</strong>
3613
+
3614
  <?php }?>
3615
  </div>
3616
  <hr>
3617
+
3618
  <h4><a id="openid_question1" >My users get the following message -"There was an error in registration. Please contact your administrator." What should I do?</a></h4>
3619
  <div id="openid_question1_desc">
3620
  This message is thrown by WordPress when there is an error in user-registration. <br><br>
3633
  2.If you are making changes to an HTML file.<br/><br/>
3634
  Go to the HTML file which invokes your page/post and insert the following html snippet. Also, increase the margin-left value as per your requirement. Save the file. <br>
3635
  <code>&ltdiv style="margin-left:100px;"&gt <br>[miniorange_social_login]')<br>
3636
+ &lt/div&gt </code>
3637
+ </div>
3638
+
3639
  </div>
3640
  <hr>
3641
+ </td></tr>
3642
+
3643
  <tr><td>
3644
  <h3><a id="openid_question_sharing" class="mo_openid_title_panel" >Social Sharing</a></h3>
3645
  <div class="mo_openid_help_desc" hidden="" id="openid_question_sharing_desc">
3648
  You can put social sharing icons before the content, after the content or both before and after the content. Go to <b>Sharing tab</b> , check <b>Blog post</b> checkbox and select one of three(before, after, both) options available. Save settings.
3649
  </div>
3650
  <hr>
3651
+
3652
  <h4><a id="openid_question10" >Why is sharing with some applications not working?</a></h4>
3653
  <div id="openid_question10_desc">
3654
  This issue arises if your website is not publicly hosted. Facebook, for example looks for the URL to generate its preview for sharing. That does not work on localhost or any privately hosted URL.
3665
  If the problem still persists, please contact us using the Support form on the right.
3666
  </div>
3667
  <hr>
3668
+
3669
  <h4><a id="openid_question21" >There is no option of Instagram in Social Sharing. Why?</a></h4>
3670
  <div id="openid_question21_desc">
3671
  Instagram has made a conscious effort to not allow sharing from external sources to fight spam and low quality photos.
3673
  <a href='https://help.instagram.com/158826297591430' target='_blank'>https://help.instagram.com/158826297591430</a>
3674
  </div>
3675
  <hr>
3676
+
3677
  <h4><a id="openid_question18" >Email share is not working. Why?</a></h4>
3678
  <div id="openid_question18_desc">
3679
  Email share in the plugin is enabled through <b>mailto</b>. mailto is generally configured through desktop or browser so if it is not working, mailto is not setup or improperly configured.<br><br>
3680
  To set it up properly, search for "mailto settings " followed by your Operating System's name where you have your browser installed.
3681
  </div>
3682
+ <hr>
3683
 
3684
  <h4><a id="openid_question19" >I cannot see some icons in preview or on blog even though I have selected them in the plugin settings.</a></h4>
3685
  <div id="openid_question19_desc">
3687
  <br/><br/>
3688
  If you don't have Adblock installed and still face this issue, please contact us using the Support form on the right or mail us at info@xecurify.com.
3689
  </div>
3690
+
3691
  </div>
3692
  <hr>
3693
  </td></tr>
4205
 
4206
  }
4207
 
4208
+ function mo_openid_addon()
4209
+ {
4210
+ if (mo_openid_is_customer_registered()) { ?>
4211
+ <td style="vertical-align:top;width:65%;">
4212
+ <div class="mo_openid_table_layout" id="customization_ins" style="display: block">
4213
+
4214
+ <?php if (!mo_openid_is_customer_registered()) { ?>
4215
+ <div style="display:block;margin-top:10px;color:red;background-color:rgba(251, 232, 0, 0.15);padding:5px;border:solid 1px rgba(255, 0, 9, 0.36);">
4216
+ Please <a
4217
+ href="<?php echo add_query_arg(array('tab' => 'register'), $_SERVER['REQUEST_URI']); ?>">Login
4218
+ with miniOrange</a> to enable Social Login, Social Sharing and Add-on.
4219
+ </div>
4220
+ <?php } ?>
4221
+
4222
+ <table>
4223
+ <tr>
4224
+ <td >
4225
+ <h3>Custom Registration Form
4226
+ <input type="button" value="Purchase"
4227
+ onclick="mosocial_addonform('wp_social_login_extra_attributes_addon')"
4228
+ id="mosocial_purchase_cust_addon"
4229
+ class="button button-primary button-large"
4230
+ style="float: right; margin-left: 10px;">
4231
+ <input type="button" value="Verify Key"
4232
+ id="mosocial_purchase_cust_addon_verify"
4233
+ class="button button-primary button-large"
4234
+ style="float: right;">
4235
+
4236
+ </h3>
4237
+ <b>Custom Registration Form Add-On helps you to integrate details of new as well as existing users. You
4238
+ can add as many fields as you want including the one which are returned by
4239
+ social sites at time of registration.</b>
4240
+ </td>
4241
+ </tr>
4242
+ </table>
4243
+ <table class="mo_openid_display_table table" id="mo_openid_extra_attributes_addon_video">
4244
+
4245
+ <tr>
4246
+ <td colspan="2">
4247
+ <hr>
4248
+ <p>
4249
+ <br><br>
4250
+ <iframe width="450" height="250" src="https://www.youtube.com/embed/cEvU9d3YBus"
4251
+ frameborder="0" allow="autoplay; encrypted-media" allowfullscreen
4252
+ style="margin-left: 17%; align-content: center; ma"></iframe>
4253
+ </p>
4254
+ </td>
4255
+ </tr>
4256
+ </table>
4257
+
4258
+ <table>
4259
+ <tr>
4260
+ <td style="vertical-align:top; ">
4261
+ <div class="mo_openid_table_layout"><br/>
4262
+ <form method="post">
4263
+ <h3>Customization Fields</h3>
4264
+ <input type="checkbox" disabled="disabled" id="customised_field_enable"
4265
+ value="1" checked
4266
+ <?php if (!mo_openid_is_customer_registered()) echo 'disabled' ?>/>
4267
+ <b>Enable Auto Field Registration Form</b>
4268
+
4269
+ <style>
4270
+ .tableborder {
4271
+ border-collapse: collapse;
4272
+ width: 100%;
4273
+ border-color: #eee;
4274
+ }
4275
+
4276
+ .tableborder th, .tableborder td {
4277
+ text-align: left;
4278
+ padding: 8px;
4279
+ border-color: #eee;
4280
+ }
4281
+
4282
+ .tableborder tr:nth-child(even) {
4283
+ background-color: #f2f2f2
4284
+ }
4285
+ </style>
4286
+ <!--mo_openid_custom_field_update-->
4287
+ <table id="custom_field" style="width:100%; text-align: center;" class="table mywatermark">
4288
+ <div id="myCheck">
4289
+ <h4>Registration page link <input type="text" name="profile_completion_page"
4290
+ style="width: 350px" disabled="disabled"
4291
+ value="<?php echo get_option('profile_completion_page'); ?>"
4292
+ required/></h4>
4293
+ <thead>
4294
+ <tr>
4295
+ <th>Existing Field</th>
4296
+ <th>Field</th>
4297
+ <th>Custom name</th>
4298
+ <th>Field Type</th>
4299
+ <th>Field Options</th>
4300
+ <th>Required Field</th>
4301
+ <th></th>
4302
+ </tr>
4303
+ </thead>
4304
+ <?php
4305
+ ?>
4306
+ <tr>
4307
+ <td style="width: 15%"><br><input type="text" disabled="disabled" placeholder="Existing meta field"
4308
+ style="width:90%;"/></td>
4309
+ <td style="width: 15%"><br><select id="field_1_name" disabled="disabled"
4310
+ onchange="myFunction('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
4311
+ style="width:80%">
4312
+ <option value="">Select Field</option>
4313
+ </select></td>
4314
+ <td style="width: 15%"><br><input type="text" id="opt_field_1_name" disabled="disabled"
4315
+ placeholder="Custom Field Name"
4316
+ style="width:90%;"/></td>
4317
+ <td style="width: 15%"><br><select id="field_1_value" name="field_1_value" disabled="disabled"
4318
+ onchange="myFunction2('field_1_name','opt_field_1_name','field_1_value','additional_field_1_value')"
4319
+ style="width:80%">
4320
+ <option value="default">Select Type</option>
4321
+ </select></td>
4322
+ <td style="width: 20%"><br><input type="text" id="additional_field_1_value" disabled="disabled"
4323
+ placeholder="e.g. opt1;opt2;opt3"
4324
+ style="width:90%;"/></td>
4325
+ <td style="width: 10%"><br><select name="mo_openid_custom_field_1_Required" disabled="disabled"
4326
+ style="width:57%">
4327
+ <option value="no">No</option>
4328
+ </select></td>
4329
+ <td style="width: 10%"><br><input type="button" disabled="disabled"
4330
+ value="+" onclick="add_custom_field();"
4331
+ class=" button-primary"/>&nbsp;
4332
+ <input type="button" name="mo_remove_attribute" value="-" disabled="disabled"
4333
+ onclick="remove_custom_field();" class=" button-primary"/>
4334
+ </td>
4335
+ </tr>
4336
+ </div>
4337
+ <tr id="mo_openid_custom_field">
4338
+ <td align="center" colspan="7"><br>
4339
+ <input name="mo_openid_save_config_element" type="submit" disabled="disabled"
4340
+ value="Save" <?php if (!mo_openid_is_customer_registered()) echo 'disabled' ?>
4341
+ class="button button-primary button-large"/>
4342
+ &nbsp &nbsp <a class="button button-primary button-large" disabled="disabled">Cancel</a>
4343
+ </td>
4344
+ </tr>
4345
+ <tr>
4346
+ <td align="left" colspan="7">
4347
+ <h3>Instructions to setup:</h3>
4348
+ <p>
4349
+ <ol>
4350
+ <li> Create a page and use shortcode <b>[miniorange_social_custom_fields]</b>
4351
+ where you want your form to be displayed.
4352
+ </li>
4353
+ <li> Copy the page link and paste it in the above field <b>Registration page
4354
+ link</b>.
4355
+ </li>
4356
+ <li> If you have any existing wp_usermeta field then enter that field's name in
4357
+ <b>Existing
4358
+ Field</b> column. For example, if you are saving <b>First Name</b> as
4359
+ <b>fname</b>
4360
+ in wp_usermeta field then enter <b>fname</b> in <b>Existing Field</b>
4361
+ column.
4362
+ </li>
4363
+ <li> Select field name under the <b>Field</b> dropdown.</li>
4364
+ <li> If selected field is other than custom, then <b>Field Type</b> will
4365
+ automatically be <b>Textbox</b> and there is no need to enter <b>Custom
4366
+ name</b> and <b>Field options</b>.
4367
+ </li>
4368
+ <li> If selected field is custom, then enter <b>Custom name</b>.</li>
4369
+ <li> Select <b>Field Type</b>, if selected <b>Field Type</b> is
4370
+ <b>Checkbox</b> or <b>Dropdown</b> then enter the desire options in <b>Field
4371
+ Options</b> seprated by semicolon '<b>;</b>' otherwise leave <b>Field
4372
+ Options</b> blank.
4373
+ </li>
4374
+ <li> Select <b>Required Field</b> as <b>Yes</b> if you want to make that field
4375
+ compulsory for user.
4376
+ </li>
4377
+ <li> If you want to add more than 1 fields at a time click on <b>"+"</b>.</li>
4378
+ <li> Last click on <b>Save</b> button.</li>
4379
+ </ol>
4380
+ </p>
4381
+ </td>
4382
+ </tr>
4383
+ </table>
4384
+ </form>
4385
+ <br>
4386
+ <hr>
4387
+ </div>
4388
+ </td>
4389
+ </tr>
4390
+ </table>
4391
+
4392
+
4393
+ </div>
4394
+ </td>
4395
+ <td style="vertical-align:top;padding-left:1%;">
4396
+ <div id="support"><?php echo miniorange_openid_support(); ?></div>
4397
+ </td>
4398
+ <td><form style="display:none;" id="mosocial_loginform" action="<?php echo get_option( 'mo_openid_host_name' ) . '/moas/login'; ?>"
4399
+ target="_blank" method="post" >
4400
+ <input type="email" name="username" value="<?php echo esc_attr(get_option('mo_openid_admin_email')); ?>" />
4401
+ <input type="text" name="redirectUrl" value="<?php echo esc_attr(get_option( 'mo_openid_host_name')).'/moas/initializepayment'; ?>" />
4402
+ <input type="text" name="requestOrigin" id="requestOrigin"/>
4403
+ </form>
4404
+ <script>
4405
+ function mosocial_addonform(planType) {
4406
+ jQuery('#requestOrigin').val(planType);
4407
+ jQuery('#mosocial_loginform').submit(); }
4408
+ </script>
4409
+ </td>
4410
+ <td>
4411
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
4412
+ <script type="text/javascript">
4413
+ $mo=jQuery;
4414
+ $mo(document).ready(function($){
4415
+ $("#mosocial_purchase_cust_addon_verify").on("click",function(){
4416
+ $.ajax({
4417
+ type: 'POST',
4418
+ url: '<?php echo admin_url("admin-ajax.php"); ?>',
4419
+ data: {
4420
+ action:'verify_addon_licience',
4421
+ something:'hellow',
4422
+ },
4423
+ crossDomain :!0, dataType:"html",
4424
+ success: function(data) {
4425
+ console.log(data);
4426
+ var flag=0;
4427
+ $("input").each(function(){
4428
+ if($(this).val()=="mo_openid_verify_license") flag=1;
4429
+ });
4430
+ if(!flag) {
4431
+ $(data).insertBefore("#mo_openid_extra_attributes_addon_video");
4432
+ $("#customization_ins").find($("#cust_supp")).css("display", "none");
4433
+ }
4434
+ },
4435
+ error: function (data){}
4436
+ });
4437
+ });
4438
+ });
4439
+ </script>
4440
+ </td>
4441
+ <?php
4442
+ }
4443
+ }
4444
+
4445
+ function mo_openid_show_addon_message_page()
4446
+ {
4447
+ ?>
4448
+ <td style="vertical-align:top;width:65%;">
4449
+ <div class="mo_openid_table_layout">
4450
+ <?php
4451
+ echo "<div style='text-align: center'><p>It seems <b>Extra Attributes Addon plugin</b> is not installed or activated. Please download or activate the addon.</p></div>";
4452
+ ?>
4453
+ <h2 align="center">How do I download or activate the Social Integration Registration Form Addon ?</h2>
4454
+ <p><b>Download:</b> Download addon and license key from xecurify Console
4455
+ <ol>
4456
+ <li>Login to <a target=”_blank” href="https://login.xecurify.com">xecurify Console</a>.</li>
4457
+ <li>Click on <b>License</b> on the left menu.</li>
4458
+ <li>You will see the payment made by you. Against the payment, you will see a <b>Download Plugin</b> option. Click on the link to download the plugin.</li>
4459
+ <li>A plugin of .zip extension will get downloaded.</li>
4460
+ <li>Click on <b>View License Key</b>.</li>
4461
+ <li>Copy the license key given for use during installation.</li>
4462
+ </ol>
4463
+ </p>
4464
+ <p><b>Installation:</b>
4465
+ <ol>
4466
+ <li>Go to <b>Plugins > Add New</b> and click on <b>Upload addon</b>.</li>
4467
+ <li>Upload the downloaded zip and Activate.</li>
4468
+ </ol>
4469
+ </p>
4470
+ </div>
4471
+ </td>
4472
+ <td style="vertical-align:top;padding-left:1%;">
4473
+ <?php echo miniorange_openid_support(); ?>
4474
+ </td>
4475
+ <?php
4476
+ }
4477
+
4478
+ function mo_openid_show_verify_addon_license_page($licience_type)
4479
+ {
4480
+ ?>
4481
+ <td style="vertical-align:top;width:65%;">
4482
+ <div class="mo_openid_table_layout" style="padding-bottom:50px;!important">
4483
+
4484
+ <h3>Verify Addon License </h3>
4485
+ <form name="addon_license" method="post" action="">
4486
+ <input type="hidden" name="option" value="mo_openid_verify_license"/>
4487
+ <input type="hidden" name="mo_openid_verify_license_nonce"
4488
+ value="<?php echo wp_create_nonce('mo-openid-verify-license-nonce'); ?>"/>
4489
+
4490
+ <p><b><font color="#FF0000">*</font>Enter your addon license key to activate the
4491
+ addon plugin:</b>
4492
+ <input class="mo_openid_table_textbox" required type="text"
4493
+ style="margin-left:40px;width:300px;"
4494
+ name="openid_licence_key"
4495
+ placeholder="Enter your license key to activate the plugin"/>
4496
+ </p>
4497
+ <p><b><font color="#FF0000">*</font>Please check this to confirm that you have read
4498
+ it: </b>&nbsp;&nbsp;<input required type="checkbox"
4499
+ name="license_conditions"/></p>
4500
+
4501
+
4502
+ <ol>
4503
+ <li>License key you have entered here is associated with this site instance. In
4504
+ future, if you are re-installing the plugin or your site for any reason. You
4505
+ should deactivate and then delete the plugin from wordpress console and
4506
+ should not manually delete the plugin folder. So that you can resuse the
4507
+ same license key.
4508
+ </li>
4509
+ <br>
4510
+ <li><b>This is not a developer's license.</b> Making any kind of change to the
4511
+ addon or plugin's code will delete all your configuration and make the addon as well as plugin
4512
+ unusable.
4513
+ </li>
4514
+ </ol>
4515
+ <br>
4516
+ <input type="hidden" name="licience_type" value="<?php echo $licience_type ?>"/>
4517
+ <input type="submit" name="submit" value="Activate License"
4518
+ class="button button-primary button-large"/>
4519
+
4520
+ </form>
4521
+ </div>
4522
+ </td>
4523
+ <td style="vertical-align:top;padding-left:1%;" id="cust_supp">
4524
+ <?php echo miniorange_openid_support(); ?>
4525
+ </td>
4526
+ <?php
4527
+ }
4528
+
4529
  function mo_openid_is_customer_registered() {
4530
  $email = get_option('mo_openid_admin_email');
4531
  $customerKey = get_option('mo_openid_admin_customer_key');
4536
  }
4537
  }
4538
 
4539
+ function mo_openid_is_customer_addon_license_key_verified() {
4540
+ $licenseKey = get_option('mo_openid_opn_lk_extra_attr_addon');
4541
+ $email = get_option('mo_openid_admin_email');
4542
+ $customerKey = get_option('mo_openid_admin_customer_key');
4543
+ if( !$licenseKey || ! $email || ! $customerKey || ! is_numeric( trim( $customerKey ) ) ){
4544
+ return 0;
4545
+ }else {
4546
+ return 1;
4547
+ }
4548
+ }
4549
+
4550
  function miniorange_openid_support(){
4551
  global $current_user;
4552
  $current_user = wp_get_current_user();
4671
  update_option ( 'mo_openid_new_registration', 'true' );
4672
  global $current_user;
4673
 
 
4674
  $current_user = wp_get_current_user();
4675
  ?><div id="request_registeration" class="mo_openid_modal" style="height:100%">
4676
  <!-- Modal content -->
4681
  <h1>Save As</h1>
4682
  </div>
4683
  <br>
4684
+ <span id="msg1" style="text-align: center;color: #56b11e"><?php echo (get_option("pop_regi_msg")); update_option('pop_regi_msg','Your settings are saved successfully. Please enter your valid email address and enter a password to get touch with our support team.');?></span>
4685
  <br>
4686
  <br>
4687
  <br>
4707
  </td>
4708
  </tr>
4709
 
4710
+ <tr>
 
 
 
 
 
 
 
4711
  <td><b><font color="#FF0000">*</font>Password:</b></td>
4712
  <td><input class="mo_openid_table_textbox" required name="password"
4713
  style="width: 100%" placeholder="Choose your password (Min. length 6)"
4714
  type="password" /></td>
4715
  </tr>
4716
+ <tr id="pop_register" >
4717
  <td><b><font color="#FF0000">*</font>Confirm Password:</b></td>
4718
  <td><input class="mo_openid_table_textbox" required name="confirmPassword"
4719
  style="width: 100%" placeholder="Confirm your password"
4720
  type="password" /></td>
4721
  </tr>
 
 
 
 
 
 
 
 
 
4722
 
4723
  </tbody></table>
4724
+ <br><br>
4725
+ <input value="Submit" id="register_submit" style="margin-right: 28%;" class="button button-primary button-large" type="submit">
4726
+
4727
  </div>
4728
  </form>
4729
+ <form method="post">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4730
 
4731
+ <input id="pop_next" name="show_login" value="Existing Account" class="button button-primary button-large" style="margin-left: 35%;margin-top: -7.7%;" type="submit">
 
 
4732
 
4733
  </form>
4734
 
4735
+
 
 
 
4736
 
4737
  </div>
 
 
 
 
 
 
4738
  </div>
4739
 
4740
  </div>
4741
 
 
 
 
 
 
 
 
 
 
4742
  <?php
4743
  }
4744
 
4745
  function mo_pop_show_verify_password_page() {
4746
+ update_option('regi_pop_up','yes');
4747
+ ?>
4748
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
4749
  <div id="request_registeration" class="mo_openid_modal" style="height:100%">
4750
 
4755
  <h1>Login</h1>
4756
  </div>
4757
  <br>
4758
+ <span style="text-align: center;color: #56b11e"><?php echo (get_option("pop_login_msg")); update_option('pop_login_msg','Enter Your Login Credentials.');?></span>
4759
  <br><br>
4760
  <div id="mo_saml_show_registeration_modal" >
4761
 
4762
  <!--Register with miniOrange-->
4763
  <form name="f" method="post" action="" id="pop-register-form">
4764
  <input type="hidden" name="option" value="mo_openid_connect_verify_customer" />
4765
+ <input type="hidden" name="mo_openid_connect_verify_nonce"
4766
+ value="<?php echo wp_create_nonce( 'mo-openid-connect-verify-nonce' ); ?>"/>
4767
  <div>
4768
  <table style="text-align: left;width: 100%">
4769
 
4790
  <input type="submit" value="Login" id="login_submit" style="margin-left: -21%;margin-top: -1%;" class="button button-primary button-large" "/>
4791
  </div>
4792
  </form>
4793
+ &nbsp &nbsp &nbsp <br><form method="post" style="margin-top: -15.1%;margin-left: 46%;">
4794
  <input type="submit" id="go_to_register" name="go_to_register" value="Register" class="button button-primary button-large" style="margin-left: -67%;margin-top: 7.8%;">
4795
  </form>
4796
  <p><b><a href="#forgot_password">Click here if you forgot your password?</a></b></p>
4797
  <form name="forgotpassword" method="post" action="" id="openidforgotpasswordform">
4798
  <input type="hidden" name="option" value="mo_openid_forgot_password"/>
4799
+ <input type="hidden" name="mo_openid_forgot_password_nonce"
4800
+ value="<?php echo wp_create_nonce( 'mo-openid-forgot-password-nonce' ); ?>"/>
4801
  <input type="hidden" id="forgot_pass_email" name="email" value=""/>
4802
  </form>
4803
  </div>
4812
  jQuery('#openidforgotpasswordform').submit();
4813
  });
4814
  </script>
4815
+ <?php
4816
  }
4817
+
4818
  function is_custom_app($app_name){
4819
 
4820
  if(get_option('mo_openid_apps_list'))
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.2
7
- Stable tag: 7.2.4
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.2.4 =
179
  * Made contact us changes.
180
  * Storing firstname and lastname issue solved.
@@ -642,6 +647,11 @@ SECURITY FIXES
642
  * First version of Social Login, Social Sharing plugin.
643
 
644
  == Upgrade Notice ==
 
 
 
 
 
645
  = 7.2.4 =
646
  * Made contact us changes.
647
  * Storing firstname and lastname issue solved.
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.2
7
+ Stable tag: 7.2.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
 
176
 
177
  == Changelog ==
178
+ = 7.2.5 =
179
+ * Fixed Profile completion form issue.
180
+ * Minor UI fixes.
181
+ * Added Add-on UI.
182
+
183
  = 7.2.4 =
184
  * Made contact us changes.
185
  * Storing firstname and lastname issue solved.
647
  * First version of Social Login, Social Sharing plugin.
648
 
649
  == Upgrade Notice ==
650
+ = 7.2.5 =
651
+ * Fixed Profile completion form issue.
652
+ * Minor UI fixes.
653
+ * Added Add-on UI.
654
+
655
  = 7.2.4 =
656
  * Made contact us changes.
657
  * Storing firstname and lastname issue solved.