Version Description
- Minor UI changes.
Download this release
Release Info
Developer | cyberlord92 |
Plugin | Social Login |
Version | 7.3.4 |
Comparing to | |
See all releases |
Code changes from version 7.3.3 to 7.3.4
- class-mo-openid-login-widget.php +17 -8
- includes/images/icons/reddit2.png +0 -0
- includes/images/icons/salesforce2.png +0 -0
- miniorange_openid_sso_settings.php +2 -2
- mo-openid-social-login-functions.php +11 -26
- readme.txt +8 -1
- social_apps/amazon.php +3 -0
- social_apps/facebook.php +3 -0
- social_apps/google.php +3 -0
- social_apps/instagram.php +4 -0
- social_apps/linkedin.php +3 -0
- social_apps/mo_openid_configured_apps_funct.php +15 -4
- social_apps/twitter.php +4 -0
- social_apps/vkontakte.php +3 -0
- social_apps/windowslive.php +3 -0
- social_apps/yahoo.php +3 -0
- view/config_apps/mo_openid_config_apps.php +1 -1
- view/profile_completion/mo_openid_prof_comp_funct.php +8 -7
- view/shrtco/mo_openid_shrtco.php +1 -1
class-mo-openid-login-widget.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
include "mo-openid-social-login-functions.php";
|
3 |
-
add_action( 'wp_login', 'mo_openid_link_account', 5,
|
4 |
add_action( 'mo_user_register', 'mo_openid_update_role', 1, 2);
|
5 |
add_action( 'mo_user_register','mo_openid_send_email',1, 2 );
|
6 |
if(get_option('mo_openid_popup_window')=='0') {
|
@@ -876,7 +876,6 @@ class mo_openid_login_wid extends WP_Widget {
|
|
876 |
if($customer_register=='no' && $custom_app =='false')
|
877 |
return 'disable';
|
878 |
}
|
879 |
-
|
880 |
//for shortcode
|
881 |
public function add_apps($app_name,$theme,$gdpr_setting,$spacebetweenicons,$customWidth,$customHeight,$customBoundary,$buttonText,$dis,$customTextofTitle,$customSize,$selected_theme,$custom_app,$html,$view,$customBackground,$app_dis)
|
882 |
{
|
@@ -1216,7 +1215,6 @@ class mo_openid_login_wid extends WP_Widget {
|
|
1216 |
|
1217 |
}
|
1218 |
|
1219 |
-
|
1220 |
private function mo_openid_load_login_script() {
|
1221 |
if(!get_option('mo_openid_gdpr_consent_enable')){?>
|
1222 |
<script>
|
@@ -1563,6 +1561,7 @@ function mo_openid_redirect_after_logout($logout_url)
|
|
1563 |
|
1564 |
function mo_openid_login_validate(){
|
1565 |
|
|
|
1566 |
$present_time_rateus_pop = date('Y-m-d');
|
1567 |
if(get_option('check_ten_rate_us') < 5 ){
|
1568 |
if(get_option('mo_openid_user_activation_date') < $present_time_rateus_pop){
|
@@ -1680,6 +1679,7 @@ function mo_openid_login_validate(){
|
|
1680 |
'social_user_id' => $social_user_id,
|
1681 |
);
|
1682 |
|
|
|
1683 |
$user = get_user_by('id', $user_id );
|
1684 |
update_custom_data($user_id);
|
1685 |
//registration hook
|
@@ -1775,6 +1775,7 @@ function mo_openid_login_validate(){
|
|
1775 |
if ( ! wp_verify_nonce( $nonce, 'mo-openid-account-linking-nonce' ) ) {
|
1776 |
wp_die('<strong>ERROR</strong>: Invalid Request.');
|
1777 |
} else {
|
|
|
1778 |
//link account
|
1779 |
if (!isset($_POST['mo_openid_create_new_account'])) {
|
1780 |
$nonce = wp_create_nonce('mo-openid-disable-social-login-nonce');
|
@@ -1973,7 +1974,9 @@ function mo_openid_update_role($user_id='', $user_url=''){
|
|
1973 |
|
1974 |
|
1975 |
function mo_openid_login_redirect($username = '', $user = NULL){
|
1976 |
-
|
|
|
|
|
1977 |
wp_set_auth_cookie( $user_id, true );
|
1978 |
$redirect_url = mo_openid_get_redirect_url();
|
1979 |
wp_redirect($redirect_url);
|
@@ -1983,6 +1986,7 @@ function mo_openid_login_redirect($username = '', $user = NULL){
|
|
1983 |
|
1984 |
function mo_openid_login_redirect_pop_up($username = '', $user = NULL){
|
1985 |
|
|
|
1986 |
if(is_string($username) && $username && is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && isset($_SESSION['mo_login']) && $_SESSION['mo_login']){
|
1987 |
$_SESSION['mo_login'] = false;
|
1988 |
wp_set_auth_cookie( $user_id, true );
|
@@ -2004,6 +2008,8 @@ function mo_openid_login_redirect_pop_up($username = '', $user = NULL){
|
|
2004 |
}
|
2005 |
|
2006 |
function mo_openid_update_user_meta($username, $user ){
|
|
|
|
|
2007 |
if(isset($_SESSION['location_city'])? $_SESSION['location_city']: '') {
|
2008 |
update_user_meta($user->ID, 'location_city', $_SESSION['location_city']);
|
2009 |
}
|
@@ -2058,14 +2064,15 @@ function mo_openid_update_user_meta($username, $user ){
|
|
2058 |
update_user_meta( $user->ID, 'NA', isset($_SESSION['NA'])? $_SESSION['NA']:'' );
|
2059 |
}
|
2060 |
|
2061 |
-
function mo_openid_link_account( $username, $user){
|
2062 |
if($user){
|
2063 |
$userid = $user->ID;
|
2064 |
}
|
2065 |
-
|
2066 |
-
$social_app_identifier = $_COOKIE['social_id'];
|
2067 |
-
$social_app_name = $_COOKIE['social_app_name'];
|
2068 |
|
|
|
|
|
|
|
2069 |
if(empty($user_email)){
|
2070 |
$user_email=$user->user_email;
|
2071 |
}
|
@@ -2076,9 +2083,11 @@ function mo_openid_link_account( $username, $user){
|
|
2076 |
elseif(!isset($userid)){
|
2077 |
return;
|
2078 |
}
|
|
|
2079 |
global $wpdb;
|
2080 |
$db_prefix = $wpdb->prefix;
|
2081 |
$linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM ".$db_prefix."mo_openid_linked_user where linked_email = \"%s\" AND linked_social_app = \"%s\"",$user_email,$social_app_name));
|
|
|
2082 |
// if a user with given email and social app name doesn't already exist in the mo_openid_linked_user table
|
2083 |
if(!isset($linked_email_id)){
|
2084 |
mo_openid_insert_query($social_app_name,$user_email,$userid,$social_app_identifier);
|
1 |
<?php
|
2 |
include "mo-openid-social-login-functions.php";
|
3 |
+
add_action( 'wp_login', 'mo_openid_link_account', 5, 2);
|
4 |
add_action( 'mo_user_register', 'mo_openid_update_role', 1, 2);
|
5 |
add_action( 'mo_user_register','mo_openid_send_email',1, 2 );
|
6 |
if(get_option('mo_openid_popup_window')=='0') {
|
876 |
if($customer_register=='no' && $custom_app =='false')
|
877 |
return 'disable';
|
878 |
}
|
|
|
879 |
//for shortcode
|
880 |
public function add_apps($app_name,$theme,$gdpr_setting,$spacebetweenicons,$customWidth,$customHeight,$customBoundary,$buttonText,$dis,$customTextofTitle,$customSize,$selected_theme,$custom_app,$html,$view,$customBackground,$app_dis)
|
881 |
{
|
1215 |
|
1216 |
}
|
1217 |
|
|
|
1218 |
private function mo_openid_load_login_script() {
|
1219 |
if(!get_option('mo_openid_gdpr_consent_enable')){?>
|
1220 |
<script>
|
1561 |
|
1562 |
function mo_openid_login_validate(){
|
1563 |
|
1564 |
+
|
1565 |
$present_time_rateus_pop = date('Y-m-d');
|
1566 |
if(get_option('check_ten_rate_us') < 5 ){
|
1567 |
if(get_option('mo_openid_user_activation_date') < $present_time_rateus_pop){
|
1679 |
'social_user_id' => $social_user_id,
|
1680 |
);
|
1681 |
|
1682 |
+
mo_openid_start_session_login($session_values);
|
1683 |
$user = get_user_by('id', $user_id );
|
1684 |
update_custom_data($user_id);
|
1685 |
//registration hook
|
1775 |
if ( ! wp_verify_nonce( $nonce, 'mo-openid-account-linking-nonce' ) ) {
|
1776 |
wp_die('<strong>ERROR</strong>: Invalid Request.');
|
1777 |
} else {
|
1778 |
+
mo_openid_start_session();
|
1779 |
//link account
|
1780 |
if (!isset($_POST['mo_openid_create_new_account'])) {
|
1781 |
$nonce = wp_create_nonce('mo-openid-disable-social-login-nonce');
|
1974 |
|
1975 |
|
1976 |
function mo_openid_login_redirect($username = '', $user = NULL){
|
1977 |
+
mo_openid_start_session();
|
1978 |
+
if(is_string($username) && $username && is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && isset($_SESSION['mo_login']) && $_SESSION['mo_login']){
|
1979 |
+
$_SESSION['mo_login'] = false;
|
1980 |
wp_set_auth_cookie( $user_id, true );
|
1981 |
$redirect_url = mo_openid_get_redirect_url();
|
1982 |
wp_redirect($redirect_url);
|
1986 |
|
1987 |
function mo_openid_login_redirect_pop_up($username = '', $user = NULL){
|
1988 |
|
1989 |
+
mo_openid_start_session();
|
1990 |
if(is_string($username) && $username && is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && isset($_SESSION['mo_login']) && $_SESSION['mo_login']){
|
1991 |
$_SESSION['mo_login'] = false;
|
1992 |
wp_set_auth_cookie( $user_id, true );
|
2008 |
}
|
2009 |
|
2010 |
function mo_openid_update_user_meta($username, $user ){
|
2011 |
+
mo_openid_start_session();
|
2012 |
+
|
2013 |
if(isset($_SESSION['location_city'])? $_SESSION['location_city']: '') {
|
2014 |
update_user_meta($user->ID, 'location_city', $_SESSION['location_city']);
|
2015 |
}
|
2064 |
update_user_meta( $user->ID, 'NA', isset($_SESSION['NA'])? $_SESSION['NA']:'' );
|
2065 |
}
|
2066 |
|
2067 |
+
function mo_openid_link_account( $username, $user ){
|
2068 |
if($user){
|
2069 |
$userid = $user->ID;
|
2070 |
}
|
2071 |
+
mo_openid_start_session();
|
|
|
|
|
2072 |
|
2073 |
+
$user_email = isset($_SESSION['user_email']) ? sanitize_text_field($_SESSION['user_email']):'';
|
2074 |
+
$social_app_identifier = isset($_SESSION['social_user_id']) ? sanitize_text_field($_SESSION['social_user_id']):'';
|
2075 |
+
$social_app_name = isset($_SESSION['social_app_name']) ? sanitize_text_field($_SESSION['social_app_name']):'';
|
2076 |
if(empty($user_email)){
|
2077 |
$user_email=$user->user_email;
|
2078 |
}
|
2083 |
elseif(!isset($userid)){
|
2084 |
return;
|
2085 |
}
|
2086 |
+
|
2087 |
global $wpdb;
|
2088 |
$db_prefix = $wpdb->prefix;
|
2089 |
$linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM ".$db_prefix."mo_openid_linked_user where linked_email = \"%s\" AND linked_social_app = \"%s\"",$user_email,$social_app_name));
|
2090 |
+
|
2091 |
// if a user with given email and social app name doesn't already exist in the mo_openid_linked_user table
|
2092 |
if(!isset($linked_email_id)){
|
2093 |
mo_openid_insert_query($social_app_name,$user_email,$userid,$social_app_identifier);
|
includes/images/icons/reddit2.png
DELETED
Binary file
|
includes/images/icons/salesforce2.png
DELETED
Binary file
|
miniorange_openid_sso_settings.php
CHANGED
@@ -4,12 +4,12 @@
|
|
4 |
* Plugin Name: Social Login, Social Sharing by miniOrange
|
5 |
* Plugin URI: https://www.miniorange.com
|
6 |
* Description: Allow your users to login, comment and share with Facebook, Google, Apple, Twitter, LinkedIn etc using customizable buttons.
|
7 |
-
* Version: 7.3.
|
8 |
* Author: miniOrange
|
9 |
* License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
|
10 |
*/
|
11 |
|
12 |
-
define('MO_OPENID_SOCIAL_LOGIN_VERSION', '7.3.
|
13 |
define('plugin_url', plugin_dir_url(__FILE__) . "includes/images/icons/");
|
14 |
define('MOSL_PLUGIN_DIR',str_replace('/','\\',plugin_dir_path(__FILE__)));
|
15 |
require('miniorange_openid_sso_settings_page.php');
|
4 |
* Plugin Name: Social Login, Social Sharing by miniOrange
|
5 |
* Plugin URI: https://www.miniorange.com
|
6 |
* Description: Allow your users to login, comment and share with Facebook, Google, Apple, Twitter, LinkedIn etc using customizable buttons.
|
7 |
+
* Version: 7.3.4
|
8 |
* Author: miniOrange
|
9 |
* License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
|
10 |
*/
|
11 |
|
12 |
+
define('MO_OPENID_SOCIAL_LOGIN_VERSION', '7.3.4');
|
13 |
define('plugin_url', plugin_dir_url(__FILE__) . "includes/images/icons/");
|
14 |
define('MOSL_PLUGIN_DIR',str_replace('/','\\',plugin_dir_path(__FILE__)));
|
15 |
require('miniorange_openid_sso_settings_page.php');
|
mo-openid-social-login-functions.php
CHANGED
@@ -3,13 +3,13 @@ require 'social_apps/mo_openid_configured_apps_funct.php';
|
|
3 |
|
4 |
function mo_openid_start_session() {
|
5 |
if( !session_id() ) {
|
6 |
-
|
7 |
}
|
8 |
}
|
9 |
|
10 |
function mo_openid_end_session() {
|
11 |
-
|
12 |
-
|
13 |
}
|
14 |
|
15 |
function mo_openid_initialize_social_login(){
|
@@ -57,13 +57,13 @@ function mo_openid_process_custom_app_callback()
|
|
57 |
}
|
58 |
$code = $profile_url = $client_id = $current_url = $client_secret = $access_token_uri = $postData = $oauth_token = $user_url = $user_name = $email = '';
|
59 |
$oauth_access_token = $redirect_url = $option = $oauth_token_secret = $screen_name = $profile_json_output = $oauth_verifier = $twitter_oauth_token = $access_token_json_output = [];
|
|
|
60 |
if (strpos($_SERVER['REQUEST_URI'], "oauth_verifier") !== false) {
|
61 |
-
$appname = "twitter";
|
62 |
}
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
$appname = "twitter";
|
67 |
} else if (strpos($_SERVER['REQUEST_URI'], "openidcallback") !== false) {
|
68 |
if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/google") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=google") !== false)) {
|
69 |
$appname = "google";
|
@@ -241,15 +241,8 @@ function mo_openid_process_user_details($appuserdetails,$appname)
|
|
241 |
'social_app_name' => $appname,
|
242 |
'social_user_id' => $social_user_id,
|
243 |
);
|
|
|
244 |
// user is a member
|
245 |
-
setcookie('social_id', $session_values['social_user_id'], 0 ,"/");
|
246 |
-
$_COOKIE['social_id']=$session_values['social_user_id'];
|
247 |
-
setcookie('user_email', $session_values['user_email'],0,"/" );
|
248 |
-
$_COOKIE['user_email']=$session_values['user_email'];
|
249 |
-
setcookie('social_app_name', $session_values['social_app_name'],0,"/");
|
250 |
-
$_COOKIE['social_app_name']=$session_values['social_app_name'];
|
251 |
-
|
252 |
-
|
253 |
if ((isset($linked_email_id)) || (isset($email_user_id)) || (isset($existing_email_user_id))) {
|
254 |
if ((!isset($linked_email_id)) && (isset($email_user_id))) {
|
255 |
$linked_email_id = $email_user_id;
|
@@ -383,21 +376,12 @@ function mo_create_new_user($user_val){
|
|
383 |
'social_app_name' => $appname,
|
384 |
'social_user_id' => $social_user_id,
|
385 |
);
|
386 |
-
if(isset($session_values['social_user_id'])? $session_values['social_user_id']: '') {
|
387 |
-
update_user_meta($user_id, 'social_user_id', $session_values['social_user_id']);
|
388 |
-
}
|
389 |
-
if(isset($session_values['social_app_name'])? $session_values['social_app_name']: '') {
|
390 |
-
update_user_meta($user_id, 'social_app_name', $session_values['social_app_name']);
|
391 |
-
}
|
392 |
-
if(isset($session_values['user_email'])? $session_values['user_email']: '') {
|
393 |
-
update_user_meta($user_id, 'user_email', $session_values['user_email']);
|
394 |
-
}
|
395 |
|
|
|
396 |
$user = get_user_by('id', $user_id );
|
397 |
-
|
398 |
//registration hook
|
399 |
do_action( 'mo_user_register', $user_id,$user_profile_url);
|
400 |
-
mo_openid_link_account($user->user_login, $user
|
401 |
$linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_social_app = \"%s\" AND identifier = %s", $appname, $social_user_id));
|
402 |
mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,0);
|
403 |
}
|
@@ -413,6 +397,7 @@ function mo_openid_customize_logo(){
|
|
413 |
}
|
414 |
|
415 |
function mo_openid_save_extended_attributes_in_session($extended_attr){
|
|
|
416 |
$_SESSION['location_city'] = isset($extended_attr['location_city'])?$extended_attr['location_city']:'';
|
417 |
$_SESSION['location_country'] = isset($extended_attr['$location_country'])?$extended_attr['location_country']:'';
|
418 |
$_SESSION['about_me'] = isset($extended_attr['about_me'])?$extended_attr['about_me']:'';
|
3 |
|
4 |
function mo_openid_start_session() {
|
5 |
if( !session_id() ) {
|
6 |
+
session_start();
|
7 |
}
|
8 |
}
|
9 |
|
10 |
function mo_openid_end_session() {
|
11 |
+
session_start();
|
12 |
+
session_unset(); //unsets all session variables
|
13 |
}
|
14 |
|
15 |
function mo_openid_initialize_social_login(){
|
57 |
}
|
58 |
$code = $profile_url = $client_id = $current_url = $client_secret = $access_token_uri = $postData = $oauth_token = $user_url = $user_name = $email = '';
|
59 |
$oauth_access_token = $redirect_url = $option = $oauth_token_secret = $screen_name = $profile_json_output = $oauth_verifier = $twitter_oauth_token = $access_token_json_output = [];
|
60 |
+
mo_openid_start_session();
|
61 |
if (strpos($_SERVER['REQUEST_URI'], "oauth_verifier") !== false) {
|
62 |
+
$_SESSION['appname'] = "twitter";
|
63 |
}
|
64 |
|
65 |
+
if (isset($_SESSION['appname'])) {
|
66 |
+
$appname = $_SESSION['appname'];
|
|
|
67 |
} else if (strpos($_SERVER['REQUEST_URI'], "openidcallback") !== false) {
|
68 |
if ((strpos($_SERVER['REQUEST_URI'], "openidcallback/google") !== false) || (strpos($_SERVER['REQUEST_URI'], "openidcallback=google") !== false)) {
|
69 |
$appname = "google";
|
241 |
'social_app_name' => $appname,
|
242 |
'social_user_id' => $social_user_id,
|
243 |
);
|
244 |
+
mo_openid_start_session_login($session_values);
|
245 |
// user is a member
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
if ((isset($linked_email_id)) || (isset($email_user_id)) || (isset($existing_email_user_id))) {
|
247 |
if ((!isset($linked_email_id)) && (isset($email_user_id))) {
|
248 |
$linked_email_id = $email_user_id;
|
376 |
'social_app_name' => $appname,
|
377 |
'social_user_id' => $social_user_id,
|
378 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
|
380 |
+
mo_openid_start_session_login($session_values);
|
381 |
$user = get_user_by('id', $user_id );
|
|
|
382 |
//registration hook
|
383 |
do_action( 'mo_user_register', $user_id,$user_profile_url);
|
384 |
+
mo_openid_link_account($user->user_login, $user);
|
385 |
$linked_email_id = $wpdb->get_var($wpdb->prepare("SELECT user_id FROM " . $db_prefix . "mo_openid_linked_user where linked_social_app = \"%s\" AND identifier = %s", $appname, $social_user_id));
|
386 |
mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,0);
|
387 |
}
|
397 |
}
|
398 |
|
399 |
function mo_openid_save_extended_attributes_in_session($extended_attr){
|
400 |
+
mo_openid_start_session();
|
401 |
$_SESSION['location_city'] = isset($extended_attr['location_city'])?$extended_attr['location_city']:'';
|
402 |
$_SESSION['location_country'] = isset($extended_attr['$location_country'])?$extended_attr['location_country']:'';
|
403 |
$_SESSION['about_me'] = isset($extended_attr['about_me'])?$extended_attr['about_me']:'';
|
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, Woocommerce, 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.3
|
7 |
-
Stable tag: 7.3.
|
8 |
License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
|
9 |
|
10 |
Social Login with Google, Facebook, Apple, Twitter, Reddit, Vkontakte, LinkedIn and more. GDPR compliant. Social sharing and social comments. 24x7 Support.
|
@@ -177,6 +177,10 @@ Please email us at info@miniorange.com. You can also submit your query from the
|
|
177 |
|
178 |
|
179 |
== Changelog ==
|
|
|
|
|
|
|
|
|
180 |
= 7.3.3 =
|
181 |
* Minor UI changes.
|
182 |
* Fixed add-on update value issue.
|
@@ -693,6 +697,9 @@ SECURITY FIXES
|
|
693 |
* First version of Social Login, Social Sharing plugin.
|
694 |
|
695 |
== Upgrade Notice ==
|
|
|
|
|
|
|
696 |
= 7.3.3 =
|
697 |
* Minor UI changes.
|
698 |
* Fixed add-on update value issue.
|
4 |
Tags: social login, facebook login, google login, twitter login, Vkontakte login, Woocommerce, 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.3
|
7 |
+
Stable tag: 7.3.4
|
8 |
License URI: http://miniorange.com/usecases/miniOrange_User_Agreement.pdf
|
9 |
|
10 |
Social Login with Google, Facebook, Apple, Twitter, Reddit, Vkontakte, LinkedIn and more. GDPR compliant. Social sharing and social comments. 24x7 Support.
|
177 |
|
178 |
|
179 |
== Changelog ==
|
180 |
+
= 7.3.4 =
|
181 |
+
* Minor UI changes.
|
182 |
+
|
183 |
+
|
184 |
= 7.3.3 =
|
185 |
* Minor UI changes.
|
186 |
* Fixed add-on update value issue.
|
697 |
* First version of Social Login, Social Sharing plugin.
|
698 |
|
699 |
== Upgrade Notice ==
|
700 |
+
= 7.3.4 =
|
701 |
+
* Minor UI changes.
|
702 |
+
|
703 |
= 7.3.3 =
|
704 |
* Minor UI changes.
|
705 |
* Fixed add-on update value issue.
|
social_apps/amazon.php
CHANGED
@@ -17,6 +17,8 @@ class amazon
|
|
17 |
{
|
18 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
19 |
$social_app_redirect_uri= get_social_app_redirect_uri('amazon');
|
|
|
|
|
20 |
$client_id = $appslist['amazon']['clientid'];
|
21 |
$scope = $appslist['amazon']['scope'];
|
22 |
$login_dialog_url = 'https://www.amazon.com/ap/oa?client_id=' . $client_id . '&scope=' . $scope . '&redirect_uri=' . $social_app_redirect_uri . '&response_type=code';
|
@@ -35,6 +37,7 @@ class amazon
|
|
35 |
$postData = 'grant_type=authorization_code&client_id='. $client_id .'&client_secret=' . $client_secret . '&code=' . $code . '&redirect_uri=' . $social_app_redirect_uri;
|
36 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'amazon');
|
37 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
38 |
$profile_url = 'https://api.amazon.com/user/profile?access_token=' . $access_token;
|
39 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'amazon');
|
40 |
|
17 |
{
|
18 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
19 |
$social_app_redirect_uri= get_social_app_redirect_uri('amazon');
|
20 |
+
mo_openid_start_session();
|
21 |
+
$_SESSION["appname"] = 'amazon';
|
22 |
$client_id = $appslist['amazon']['clientid'];
|
23 |
$scope = $appslist['amazon']['scope'];
|
24 |
$login_dialog_url = 'https://www.amazon.com/ap/oa?client_id=' . $client_id . '&scope=' . $scope . '&redirect_uri=' . $social_app_redirect_uri . '&response_type=code';
|
37 |
$postData = 'grant_type=authorization_code&client_id='. $client_id .'&client_secret=' . $client_secret . '&code=' . $code . '&redirect_uri=' . $social_app_redirect_uri;
|
38 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'amazon');
|
39 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
40 |
+
mo_openid_start_session();
|
41 |
$profile_url = 'https://api.amazon.com/user/profile?access_token=' . $access_token;
|
42 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'amazon');
|
43 |
|
social_apps/facebook.php
CHANGED
@@ -15,6 +15,8 @@ class facebook
|
|
15 |
{
|
16 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
17 |
$social_app_redirect_uri= get_social_app_redirect_uri('facebook');
|
|
|
|
|
18 |
$client_id = $appslist['facebook']['clientid'];
|
19 |
$scope = $appslist['facebook']['scope'];
|
20 |
$login_dialog_url = "https://www.facebook.com/v2.11/dialog/oauth?client_id=".$client_id. '&redirect_uri='. $social_app_redirect_uri .'&response_type=code&scope='.$scope;
|
@@ -34,6 +36,7 @@ class facebook
|
|
34 |
$postData = 'client_id=' . $client_id . '&redirect_uri=' . $social_app_redirect_uri . '&client_secret=' . $client_secret . '&code=' . $code;
|
35 |
$access_token_json_output=mo_openid_get_access_token($postData,$access_token_uri,'facebook');
|
36 |
$access_token = isset( $access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
37 |
$px = get_option('facebook_profile_pic_resolution')?get_option('facebook_profile_pic_resolution'):'180';
|
38 |
$profile_url ='https://graph.facebook.com/me/?fields=age_range,birthday,about,cover,currency,devices,education,email,favorite_athletes,favorite_teams,first_name,gender,hometown,inspirational_people,interested_in,is_verified,languages,last_name,link,locale,location,meeting_for,middle_name,name,name_format,political,public_key,quotes,relationship_status,religion,sports,timezone,updated_time,verified,website,work,friends,picture.height('.$px.')&access_token=' .$access_token;
|
39 |
$profile_json_output = mo_openid_get_social_app_data($access_token,$profile_url,'facebook');
|
15 |
{
|
16 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
17 |
$social_app_redirect_uri= get_social_app_redirect_uri('facebook');
|
18 |
+
mo_openid_start_session();
|
19 |
+
$_SESSION["appname"] = 'facebook';
|
20 |
$client_id = $appslist['facebook']['clientid'];
|
21 |
$scope = $appslist['facebook']['scope'];
|
22 |
$login_dialog_url = "https://www.facebook.com/v2.11/dialog/oauth?client_id=".$client_id. '&redirect_uri='. $social_app_redirect_uri .'&response_type=code&scope='.$scope;
|
36 |
$postData = 'client_id=' . $client_id . '&redirect_uri=' . $social_app_redirect_uri . '&client_secret=' . $client_secret . '&code=' . $code;
|
37 |
$access_token_json_output=mo_openid_get_access_token($postData,$access_token_uri,'facebook');
|
38 |
$access_token = isset( $access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
39 |
+
mo_openid_start_session();
|
40 |
$px = get_option('facebook_profile_pic_resolution')?get_option('facebook_profile_pic_resolution'):'180';
|
41 |
$profile_url ='https://graph.facebook.com/me/?fields=age_range,birthday,about,cover,currency,devices,education,email,favorite_athletes,favorite_teams,first_name,gender,hometown,inspirational_people,interested_in,is_verified,languages,last_name,link,locale,location,meeting_for,middle_name,name,name_format,political,public_key,quotes,relationship_status,religion,sports,timezone,updated_time,verified,website,work,friends,picture.height('.$px.')&access_token=' .$access_token;
|
42 |
$profile_json_output = mo_openid_get_social_app_data($access_token,$profile_url,'facebook');
|
social_apps/google.php
CHANGED
@@ -16,6 +16,8 @@ class google
|
|
16 |
{
|
17 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
18 |
$social_app_redirect_uri= get_social_app_redirect_uri('google');
|
|
|
|
|
19 |
$client_id = $appslist['google']['clientid'];
|
20 |
$scope = $appslist['google']['scope'];
|
21 |
$login_dialog_url = 'https://accounts.google.com/o/oauth2/auth?redirect_uri=' .$social_app_redirect_uri .'&response_type=code&client_id=' .$client_id .'&scope='.$scope.'&access_type=offline';
|
@@ -35,6 +37,7 @@ class google
|
|
35 |
$postData = 'code=' .$code .'&client_id=' .$client_id .'&client_secret=' . $client_secret . '&redirect_uri=' . $social_app_redirect_uri . '&grant_type=authorization_code';
|
36 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'google');
|
37 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
38 |
$profile_url = 'https://www.googleapis.com/oauth2/v1/userinfo?access_token=' .$access_token;
|
39 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url, 'google');
|
40 |
|
16 |
{
|
17 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
18 |
$social_app_redirect_uri= get_social_app_redirect_uri('google');
|
19 |
+
mo_openid_start_session();
|
20 |
+
$_SESSION["appname"] = 'google';
|
21 |
$client_id = $appslist['google']['clientid'];
|
22 |
$scope = $appslist['google']['scope'];
|
23 |
$login_dialog_url = 'https://accounts.google.com/o/oauth2/auth?redirect_uri=' .$social_app_redirect_uri .'&response_type=code&client_id=' .$client_id .'&scope='.$scope.'&access_type=offline';
|
37 |
$postData = 'code=' .$code .'&client_id=' .$client_id .'&client_secret=' . $client_secret . '&redirect_uri=' . $social_app_redirect_uri . '&grant_type=authorization_code';
|
38 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'google');
|
39 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
40 |
+
mo_openid_start_session();
|
41 |
$profile_url = 'https://www.googleapis.com/oauth2/v1/userinfo?access_token=' .$access_token;
|
42 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url, 'google');
|
43 |
|
social_apps/instagram.php
CHANGED
@@ -24,6 +24,8 @@ class instagram
|
|
24 |
{
|
25 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
26 |
$social_app_redirect_uri= get_social_app_redirect_uri('instagram');
|
|
|
|
|
27 |
$client_id = $appslist['instagram']['clientid'];
|
28 |
$scope = $appslist['instagram']['scope'];
|
29 |
$login_dialog_url = 'https://api.instagram.com/oauth/authorize/?client_id=' . $client_id . '&redirect_uri=' . $social_app_redirect_uri . '&scope='.$scope.'&response_type=code';
|
@@ -43,8 +45,10 @@ class instagram
|
|
43 |
$postData = 'client_id='. $client_id .'&client_secret=' . $client_secret . '&grant_type=authorization_code&redirect_uri=' . $social_app_redirect_uri.'&code=' . $code;
|
44 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'instagram');
|
45 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
46 |
$profile_url = 'https://graph.instagram.com/me?fields=id,username&access_token='.$access_token;
|
47 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'amazon');
|
|
|
48 |
|
49 |
//Test Configuration
|
50 |
if (is_user_logged_in() && get_option('mo_openid_test_configuration') == 1) {
|
24 |
{
|
25 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
26 |
$social_app_redirect_uri= get_social_app_redirect_uri('instagram');
|
27 |
+
mo_openid_start_session();
|
28 |
+
$_SESSION["appname"] = 'instagram';
|
29 |
$client_id = $appslist['instagram']['clientid'];
|
30 |
$scope = $appslist['instagram']['scope'];
|
31 |
$login_dialog_url = 'https://api.instagram.com/oauth/authorize/?client_id=' . $client_id . '&redirect_uri=' . $social_app_redirect_uri . '&scope='.$scope.'&response_type=code';
|
45 |
$postData = 'client_id='. $client_id .'&client_secret=' . $client_secret . '&grant_type=authorization_code&redirect_uri=' . $social_app_redirect_uri.'&code=' . $code;
|
46 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'instagram');
|
47 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
48 |
+
mo_openid_start_session();
|
49 |
$profile_url = 'https://graph.instagram.com/me?fields=id,username&access_token='.$access_token;
|
50 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'amazon');
|
51 |
+
mo_openid_start_session();
|
52 |
|
53 |
//Test Configuration
|
54 |
if (is_user_logged_in() && get_option('mo_openid_test_configuration') == 1) {
|
social_apps/linkedin.php
CHANGED
@@ -16,6 +16,8 @@ class linkedin
|
|
16 |
{
|
17 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
18 |
$social_app_redirect_uri= get_social_app_redirect_uri('linkedin');
|
|
|
|
|
19 |
$client_id = $appslist['linkedin']['clientid'];
|
20 |
$scope = $appslist['linkedin']['scope'];
|
21 |
$login_dialog_url ='https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id='.$client_id.'&redirect_uri=' . $social_app_redirect_uri .'&state=fooobar&scope=' . $scope;
|
@@ -37,6 +39,7 @@ class linkedin
|
|
37 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'linkedin');
|
38 |
|
39 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
40 |
|
41 |
$profile_url_email = 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))';
|
42 |
$profile_url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,emailAddress,profilePicture(displayImage~:playableStreams))';
|
16 |
{
|
17 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
18 |
$social_app_redirect_uri= get_social_app_redirect_uri('linkedin');
|
19 |
+
mo_openid_start_session();
|
20 |
+
$_SESSION["appname"] = 'linkedin';
|
21 |
$client_id = $appslist['linkedin']['clientid'];
|
22 |
$scope = $appslist['linkedin']['scope'];
|
23 |
$login_dialog_url ='https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id='.$client_id.'&redirect_uri=' . $social_app_redirect_uri .'&state=fooobar&scope=' . $scope;
|
39 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'linkedin');
|
40 |
|
41 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
42 |
+
mo_openid_start_session();
|
43 |
|
44 |
$profile_url_email = 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))';
|
45 |
$profile_url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,emailAddress,profilePicture(displayImage~:playableStreams))';
|
social_apps/mo_openid_configured_apps_funct.php
CHANGED
@@ -234,6 +234,20 @@ function mo_openid_insert_query($social_app_name,$user_email,$userid,$social_app
|
|
234 |
}
|
235 |
}
|
236 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
function mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,$user_mod_msg){
|
238 |
if (get_option('moopenid_social_login_avatar') && isset($user_picture))
|
239 |
update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
|
@@ -263,11 +277,8 @@ function mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,$use
|
|
263 |
exit();
|
264 |
}
|
265 |
}
|
266 |
-
else
|
267 |
-
wp_set_current_user($user_id);
|
268 |
-
wp_set_auth_cookie($user_id);
|
269 |
do_action('wp_login', $user->user_login, $user);
|
270 |
-
}
|
271 |
exit;
|
272 |
}
|
273 |
|
234 |
}
|
235 |
}
|
236 |
|
237 |
+
function mo_openid_start_session_login($session_values){
|
238 |
+
mo_openid_start_session();
|
239 |
+
$_SESSION['mo_login'] = true;
|
240 |
+
$_SESSION['registered_user']='1';
|
241 |
+
$_SESSION['username'] = isset($session_values['username']) ? $session_values['username'] : '';
|
242 |
+
$_SESSION['user_email'] = isset($session_values['user_email']) ? $session_values['user_email'] : '';
|
243 |
+
$_SESSION['user_full_name'] = isset($session_values['user_full_name']) ? $session_values['user_full_name'] : '';
|
244 |
+
$_SESSION['first_name'] = isset($session_values['first_name']) ? $session_values['first_name'] : '';
|
245 |
+
$_SESSION['last_name'] = isset($session_values['last_name']) ? $session_values['last_name'] : '';
|
246 |
+
$_SESSION['user_url'] = isset($session_values['user_url']) ? $session_values['user_url'] : '';
|
247 |
+
$_SESSION['user_picture'] = isset($session_values['user_picture']) ? $session_values['user_picture'] : '';
|
248 |
+
$_SESSION['social_app_name'] = isset($session_values['social_app_name']) ? $session_values['social_app_name'] : '';
|
249 |
+
$_SESSION['social_user_id'] = isset($session_values['social_user_id']) ? $session_values['social_user_id'] : '';
|
250 |
+
}
|
251 |
function mo_openid_login_user($linked_email_id,$user_id,$user,$user_picture,$user_mod_msg){
|
252 |
if (get_option('moopenid_social_login_avatar') && isset($user_picture))
|
253 |
update_user_meta($user_id, 'moopenid_user_avatar', $user_picture);
|
277 |
exit();
|
278 |
}
|
279 |
}
|
280 |
+
else
|
|
|
|
|
281 |
do_action('wp_login', $user->user_login, $user);
|
|
|
282 |
exit;
|
283 |
}
|
284 |
|
social_apps/twitter.php
CHANGED
@@ -16,6 +16,8 @@ class twitter
|
|
16 |
{
|
17 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
18 |
$social_app_redirect_uri= get_social_app_redirect_uri('twitter');
|
|
|
|
|
19 |
$client_id = $appslist['twitter']['clientid'];
|
20 |
$client_secret = $appslist['twitter']['clientsecret'];
|
21 |
$twiter_getrequest_object = new Mo_Openid_Twitter_OAuth($client_id,$client_secret); //creating the object of Mo_Openid_Twitter_OAuth class
|
@@ -53,6 +55,7 @@ class twitter
|
|
53 |
$screen_name1 = isset($screen_name[1]) ? $screen_name[1] : '';
|
54 |
$profile_json_output = $twitter_get_profile_signature_object->mo_twitter_get_profile_signature($oauth_access_token1,$oauth_token_secret1,$screen_name1);
|
55 |
|
|
|
56 |
//Test Configuration
|
57 |
if (is_user_logged_in() && get_option('mo_openid_test_configuration') == 1) {
|
58 |
mo_openid_app_test_config($profile_json_output);
|
@@ -258,6 +261,7 @@ class Mo_Openid_Twitter_OAuth
|
|
258 |
|
259 |
$get_response = wp_remote_get($url,$args);
|
260 |
$response = $get_response['body'];
|
|
|
261 |
|
262 |
$dirs = explode('&', $response);
|
263 |
$dirs1 = explode('=', $dirs[0]);
|
16 |
{
|
17 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
18 |
$social_app_redirect_uri= get_social_app_redirect_uri('twitter');
|
19 |
+
mo_openid_start_session();
|
20 |
+
$_SESSION["appname"] = 'twitter';
|
21 |
$client_id = $appslist['twitter']['clientid'];
|
22 |
$client_secret = $appslist['twitter']['clientsecret'];
|
23 |
$twiter_getrequest_object = new Mo_Openid_Twitter_OAuth($client_id,$client_secret); //creating the object of Mo_Openid_Twitter_OAuth class
|
55 |
$screen_name1 = isset($screen_name[1]) ? $screen_name[1] : '';
|
56 |
$profile_json_output = $twitter_get_profile_signature_object->mo_twitter_get_profile_signature($oauth_access_token1,$oauth_token_secret1,$screen_name1);
|
57 |
|
58 |
+
mo_openid_start_session();
|
59 |
//Test Configuration
|
60 |
if (is_user_logged_in() && get_option('mo_openid_test_configuration') == 1) {
|
61 |
mo_openid_app_test_config($profile_json_output);
|
261 |
|
262 |
$get_response = wp_remote_get($url,$args);
|
263 |
$response = $get_response['body'];
|
264 |
+
mo_openid_start_session();
|
265 |
|
266 |
$dirs = explode('&', $response);
|
267 |
$dirs1 = explode('=', $dirs[0]);
|
social_apps/vkontakte.php
CHANGED
@@ -24,6 +24,8 @@ class vkontakte
|
|
24 |
{
|
25 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
26 |
$social_app_redirect_uri= get_social_app_redirect_uri('vkontakte');
|
|
|
|
|
27 |
$client_id = $appslist['vkontakte']['clientid'];
|
28 |
$scope = $appslist['vkontakte']['scope'];
|
29 |
$login_dialog_url ='https://oauth.vk.com/authorize?client_id='.$client_id.'&scope='.$scope.'&response_type=code&redirect_uri=' . $social_app_redirect_uri .'&v=5.69';
|
@@ -44,6 +46,7 @@ class vkontakte
|
|
44 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'vkontakte');
|
45 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
46 |
$userid = isset($access_token_json_output['user_id']) ? $access_token_json_output['user_id'] : '';
|
|
|
47 |
$profile_url = 'https://api.vk.com/method/users.get?uids='. $userid . '&fields=uid,hash,occupation,photos,first_name,last_name,nickname,domain,site,education,relation,timezone,screen_name,sex,bdate,city,country,timezone,photo,lists,contacts,universities,schools,status,about&access_token=' . $access_token.'&v=5.69';
|
48 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'vkontakte');
|
49 |
|
24 |
{
|
25 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
26 |
$social_app_redirect_uri= get_social_app_redirect_uri('vkontakte');
|
27 |
+
mo_openid_start_session();
|
28 |
+
$_SESSION["appname"] = 'vkontakte';
|
29 |
$client_id = $appslist['vkontakte']['clientid'];
|
30 |
$scope = $appslist['vkontakte']['scope'];
|
31 |
$login_dialog_url ='https://oauth.vk.com/authorize?client_id='.$client_id.'&scope='.$scope.'&response_type=code&redirect_uri=' . $social_app_redirect_uri .'&v=5.69';
|
46 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'vkontakte');
|
47 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
48 |
$userid = isset($access_token_json_output['user_id']) ? $access_token_json_output['user_id'] : '';
|
49 |
+
mo_openid_start_session();
|
50 |
$profile_url = 'https://api.vk.com/method/users.get?uids='. $userid . '&fields=uid,hash,occupation,photos,first_name,last_name,nickname,domain,site,education,relation,timezone,screen_name,sex,bdate,city,country,timezone,photo,lists,contacts,universities,schools,status,about&access_token=' . $access_token.'&v=5.69';
|
51 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'vkontakte');
|
52 |
|
social_apps/windowslive.php
CHANGED
@@ -23,6 +23,8 @@ class windowslive
|
|
23 |
{
|
24 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
25 |
$social_app_redirect_uri = get_social_app_redirect_uri('windowslive');
|
|
|
|
|
26 |
$client_id = $appslist['windowslive']['clientid'];
|
27 |
$scope = $appslist['windowslive']['scope'];
|
28 |
$login_dialog_url = 'https://login.live.com/oauth20_authorize.srf?client_id=' . $client_id . '&scope=' . $scope . '&response_type=code&redirect_uri=' . $social_app_redirect_uri;
|
@@ -44,6 +46,7 @@ class windowslive
|
|
44 |
$postData = 'grant_type=authorization_code&client_id=' .$client_id .'&redirect_uri='. $social_app_redirect_uri .'&code='.$code .'&client_secret='. $client_secret;
|
45 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'windowslive');
|
46 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
47 |
$profile_url = 'https://apis.live.net/v5.0/me?access_token=' .$access_token;
|
48 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'windowslive');
|
49 |
|
23 |
{
|
24 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
25 |
$social_app_redirect_uri = get_social_app_redirect_uri('windowslive');
|
26 |
+
mo_openid_start_session();
|
27 |
+
$_SESSION["appname"] = 'windowslive';
|
28 |
$client_id = $appslist['windowslive']['clientid'];
|
29 |
$scope = $appslist['windowslive']['scope'];
|
30 |
$login_dialog_url = 'https://login.live.com/oauth20_authorize.srf?client_id=' . $client_id . '&scope=' . $scope . '&response_type=code&redirect_uri=' . $social_app_redirect_uri;
|
46 |
$postData = 'grant_type=authorization_code&client_id=' .$client_id .'&redirect_uri='. $social_app_redirect_uri .'&code='.$code .'&client_secret='. $client_secret;
|
47 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'windowslive');
|
48 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
49 |
+
mo_openid_start_session();
|
50 |
$profile_url = 'https://apis.live.net/v5.0/me?access_token=' .$access_token;
|
51 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'windowslive');
|
52 |
|
social_apps/yahoo.php
CHANGED
@@ -21,6 +21,8 @@ class yahoo
|
|
21 |
{
|
22 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
23 |
$social_app_redirect_uri= get_social_app_redirect_uri('yahoo');
|
|
|
|
|
24 |
$client_id = $appslist['yahoo']['clientid'];
|
25 |
$login_dialog_url= 'https://api.login.yahoo.com/oauth2/request_auth?client_id='.$client_id.'&redirect_uri='.$social_app_redirect_uri.'&response_type=code&language=en-us';
|
26 |
header('Location:'. $login_dialog_url);
|
@@ -38,6 +40,7 @@ class yahoo
|
|
38 |
$postData = 'client_id='. $client_id .'&client_secret=' . $client_secret . '&redirect_uri=' . $social_app_redirect_uri.'&code=' . $code . '&grant_type=authorization_code';
|
39 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'yahoo');
|
40 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
|
|
41 |
$profile_url = 'https://api.login.yahoo.com/openid/v1/userinfo';
|
42 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'yahoo');
|
43 |
|
21 |
{
|
22 |
$appslist = maybe_unserialize(get_option('mo_openid_apps_list'));
|
23 |
$social_app_redirect_uri= get_social_app_redirect_uri('yahoo');
|
24 |
+
mo_openid_start_session();
|
25 |
+
$_SESSION["appname"] = 'yahoo';
|
26 |
$client_id = $appslist['yahoo']['clientid'];
|
27 |
$login_dialog_url= 'https://api.login.yahoo.com/oauth2/request_auth?client_id='.$client_id.'&redirect_uri='.$social_app_redirect_uri.'&response_type=code&language=en-us';
|
28 |
header('Location:'. $login_dialog_url);
|
40 |
$postData = 'client_id='. $client_id .'&client_secret=' . $client_secret . '&redirect_uri=' . $social_app_redirect_uri.'&code=' . $code . '&grant_type=authorization_code';
|
41 |
$access_token_json_output = mo_openid_get_access_token($postData, $access_token_uri,'yahoo');
|
42 |
$access_token = isset($access_token_json_output['access_token']) ? $access_token_json_output['access_token'] : '';
|
43 |
+
mo_openid_start_session();
|
44 |
$profile_url = 'https://api.login.yahoo.com/openid/v1/userinfo';
|
45 |
$profile_json_output = mo_openid_get_social_app_data($access_token, $profile_url,'yahoo');
|
46 |
|
view/config_apps/mo_openid_config_apps.php
CHANGED
@@ -540,7 +540,7 @@ function mo_openid_show_apps()
|
|
540 |
document.getElementById('mo_openid_ajax_wait_img').style.display = 'none';
|
541 |
document.getElementById('mo_openid_ajax_wait_fade').style.display = 'none';
|
542 |
}
|
543 |
-
|
544 |
//register_old_user
|
545 |
jQuery('#mo_register_old_user').click(function () {
|
546 |
jQuery('#mo_msg_box').hide();
|
540 |
document.getElementById('mo_openid_ajax_wait_img').style.display = 'none';
|
541 |
document.getElementById('mo_openid_ajax_wait_fade').style.display = 'none';
|
542 |
}
|
543 |
+
|
544 |
//register_old_user
|
545 |
jQuery('#mo_register_old_user').click(function () {
|
546 |
jQuery('#mo_msg_box').hide();
|
view/profile_completion/mo_openid_prof_comp_funct.php
CHANGED
@@ -165,10 +165,9 @@ function send_otp_token($email){
|
|
165 |
$response = wp_mail($email, $subject,$message);
|
166 |
|
167 |
if($response){
|
168 |
-
|
169 |
-
$
|
170 |
-
|
171 |
-
$_COOKIE['otp_start_time']=time();
|
172 |
$content = array('status' => 'SUCCESS','tId' => $transactionId);
|
173 |
}
|
174 |
else
|
@@ -177,15 +176,16 @@ function send_otp_token($email){
|
|
177 |
}
|
178 |
|
179 |
function validate_otp_token($transactionId,$otpToken){
|
|
|
180 |
$customerKey = get_option('mo_openid_admin_customer_key');
|
181 |
-
$
|
182 |
-
|
183 |
-
$pass = checkTimeStamp($_COOKIE['otp_start_time'],time());
|
184 |
$pass = checkTransactionId($customerKey, $otpToken, $transactionId, $pass);
|
185 |
if($pass)
|
186 |
$content = array('status' => 'SUCCESS');
|
187 |
else
|
188 |
$content = array('status' => 'FAILURE');
|
|
|
189 |
}
|
190 |
else
|
191 |
$content = array('status' =>'FAILURE');
|
@@ -235,6 +235,7 @@ function mo_openid_social_login_validate_otp($username, $user_email, $first_name
|
|
235 |
$user = get_user_by('id', $existing_email_user_id);
|
236 |
$user_id = $user->ID;
|
237 |
}
|
|
|
238 |
mo_openid_login_user($user_email,$user_id,$user,$user_picture,1);
|
239 |
exit;
|
240 |
}else{
|
165 |
$response = wp_mail($email, $subject,$message);
|
166 |
|
167 |
if($response){
|
168 |
+
mo_openid_start_session();
|
169 |
+
$_SESSION['mo_otptoken'] = true;
|
170 |
+
$_SESSION['sent_on'] = time();
|
|
|
171 |
$content = array('status' => 'SUCCESS','tId' => $transactionId);
|
172 |
}
|
173 |
else
|
176 |
}
|
177 |
|
178 |
function validate_otp_token($transactionId,$otpToken){
|
179 |
+
mo_openid_start_session();
|
180 |
$customerKey = get_option('mo_openid_admin_customer_key');
|
181 |
+
if($_SESSION['mo_otptoken']){
|
182 |
+
$pass = checkTimeStamp($_SESSION['sent_on'],time());
|
|
|
183 |
$pass = checkTransactionId($customerKey, $otpToken, $transactionId, $pass);
|
184 |
if($pass)
|
185 |
$content = array('status' => 'SUCCESS');
|
186 |
else
|
187 |
$content = array('status' => 'FAILURE');
|
188 |
+
unset($_SESSION['$mo_otptoken']);
|
189 |
}
|
190 |
else
|
191 |
$content = array('status' =>'FAILURE');
|
235 |
$user = get_user_by('id', $existing_email_user_id);
|
236 |
$user_id = $user->ID;
|
237 |
}
|
238 |
+
mo_openid_start_session_login($user_details);
|
239 |
mo_openid_login_user($user_email,$user_id,$user,$user_picture,1);
|
240 |
exit;
|
241 |
}else{
|
view/shrtco/mo_openid_shrtco.php
CHANGED
@@ -180,7 +180,7 @@ function mo_openid_login_shortcodes(){
|
|
180 |
<br/><hr><br/>
|
181 |
<h3><?php echo mo_sl("Shortcode in php file");?></h3>
|
182 |
<?php echo mo_sl("You can use shortcode in PHP file as following: ");?>
|
183 |
-
<code><?php echo do_shortcode(
|
184 |
<?php echo mo_sl('Replace SHORTCODE in above code with the required shortcode like <code>[miniorange_social_login theme="default"]</code>, so the final code looks like following :');?><br/><br/>
|
185 |
<code id='7'><?php echo do_shortcode('[miniorange_social_login theme="default"]') ?></code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="mofa mofa-fw mofa-lg mofa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#7', '#shortcode_url33_copy')"><span id="shortcode_url33_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
|
186 |
</td>
|
180 |
<br/><hr><br/>
|
181 |
<h3><?php echo mo_sl("Shortcode in php file");?></h3>
|
182 |
<?php echo mo_sl("You can use shortcode in PHP file as following: ");?>
|
183 |
+
<code><?php echo do_shortcode(�SHORTCODE�) /?></code><br/><br/>
|
184 |
<?php echo mo_sl('Replace SHORTCODE in above code with the required shortcode like <code>[miniorange_social_login theme="default"]</code>, so the final code looks like following :');?><br/><br/>
|
185 |
<code id='7'><?php echo do_shortcode('[miniorange_social_login theme="default"]') ?></code><i style= "width: 11px;height: 9px;padding-left:2px;padding-top:3px" class="mofa mofa-fw mofa-lg mofa-copy mo_copy mo_copytooltip" onclick="copyToClipboard(this, '#7', '#shortcode_url33_copy')"><span id="shortcode_url33_copy" class="mo_copytooltiptext">Copy to Clipboard</span></i><br/><br/>
|
186 |
</td>
|