Version Description
- Done small bug fixings for twitter user fields.
- Addition of the social login in the woocommerce login form.
- Done the bug fixings regarding the user login issue when user change email address.
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Login WordPress Plugin – AccessPress Social Login Lite |
Version | 3.1.1 |
Comparing to | |
See all releases |
Code changes from version 3.1.0 to 3.1.1
- accesspress-social-login-lite.php +57 -2
- inc/frontend/login_check.php +226 -43
- readme.txt +6 -1
accesspress-social-login-lite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin name: Social Login WordPress Plugin - AccessPress Social Login Lite
|
4 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
|
5 |
Description: A plugin to add various social logins to a site.
|
6 |
-
version: 3.1.
|
7 |
Author: AccessPress Themes
|
8 |
Author URI: https://accesspressthemes.com/
|
9 |
Text Domain: accesspress-social-login-lite
|
@@ -12,7 +12,7 @@
|
|
12 |
*/
|
13 |
//Declearation of the necessary constants for plugin
|
14 |
if( !defined( 'APSL_VERSION' ) ) {
|
15 |
-
define( 'APSL_VERSION', '3.1.
|
16 |
}
|
17 |
|
18 |
if( !defined( 'APSL_IMAGE_DIR' ) ) {
|
@@ -160,6 +160,7 @@ if( !class_exists( 'APSL_Lite_Class' ) ) {
|
|
160 |
if( $options['apsl_enable_disable_plugin'] == 'yes' ) {
|
161 |
if( in_array( "login_form", $options['apsl_display_options'] ) ) {
|
162 |
add_action( 'login_form', array($this, 'add_social_login') ); // add the social logins to the login form
|
|
|
163 |
|
164 |
}
|
165 |
|
@@ -187,6 +188,9 @@ if( !class_exists( 'APSL_Lite_Class' ) ) {
|
|
187 |
* Hook to display custom avatars
|
188 |
*/
|
189 |
add_filter( 'get_avatar', array($this, 'apsl_social_login_custom_avatar'), 10, 5 );
|
|
|
|
|
|
|
190 |
}
|
191 |
|
192 |
function apsl_social_login_custom_avatar( $avatar, $mixed, $size, $default, $alt = '' ) {
|
@@ -237,7 +241,51 @@ if( !class_exists( 'APSL_Lite_Class' ) ) {
|
|
237 |
if( !get_option( APSL_SETTINGS ) ) {
|
238 |
include( 'inc/backend/activation.php' );
|
239 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
}
|
|
|
241 |
//loads the text domain for translation
|
242 |
function plugin_text_domain() {
|
243 |
load_plugin_textdomain( 'accesspress-social-login-lite', false, APSL_LANG_DIR );
|
@@ -334,6 +382,13 @@ if( !class_exists( 'APSL_Lite_Class' ) ) {
|
|
334 |
die( 'No script kiddies please!' );
|
335 |
}
|
336 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
} //class termination
|
338 |
|
339 |
}
|
3 |
Plugin name: Social Login WordPress Plugin - AccessPress Social Login Lite
|
4 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-login-lite/
|
5 |
Description: A plugin to add various social logins to a site.
|
6 |
+
version: 3.1.1
|
7 |
Author: AccessPress Themes
|
8 |
Author URI: https://accesspressthemes.com/
|
9 |
Text Domain: accesspress-social-login-lite
|
12 |
*/
|
13 |
//Declearation of the necessary constants for plugin
|
14 |
if( !defined( 'APSL_VERSION' ) ) {
|
15 |
+
define( 'APSL_VERSION', '3.1.1' );
|
16 |
}
|
17 |
|
18 |
if( !defined( 'APSL_IMAGE_DIR' ) ) {
|
160 |
if( $options['apsl_enable_disable_plugin'] == 'yes' ) {
|
161 |
if( in_array( "login_form", $options['apsl_display_options'] ) ) {
|
162 |
add_action( 'login_form', array($this, 'add_social_login') ); // add the social logins to the login form
|
163 |
+
add_action( 'woocommerce_login_form', array($this, 'add_social_login_form_to_comment') );
|
164 |
|
165 |
}
|
166 |
|
188 |
* Hook to display custom avatars
|
189 |
*/
|
190 |
add_filter( 'get_avatar', array($this, 'apsl_social_login_custom_avatar'), 10, 5 );
|
191 |
+
|
192 |
+
//add delete action when user is deleted from wordpress backend.
|
193 |
+
add_action( 'delete_user', array ($this, 'apsl_delete_user') );
|
194 |
}
|
195 |
|
196 |
function apsl_social_login_custom_avatar( $avatar, $mixed, $size, $default, $alt = '' ) {
|
241 |
if( !get_option( APSL_SETTINGS ) ) {
|
242 |
include( 'inc/backend/activation.php' );
|
243 |
}
|
244 |
+
self:: apsl_database_install();
|
245 |
+
}
|
246 |
+
|
247 |
+
//create the table to store the user details to the plugin
|
248 |
+
function apsl_database_install() {
|
249 |
+
global $wpdb;
|
250 |
+
|
251 |
+
// create user details table
|
252 |
+
$apsl_userdetails = "{$wpdb->prefix}apsl_users_social_profile_details";
|
253 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
254 |
+
|
255 |
+
$sql = "CREATE TABLE IF NOT EXISTS `$apsl_userdetails` (
|
256 |
+
id int(11) NOT NULL AUTO_INCREMENT,
|
257 |
+
user_id int(11) NOT NULL,
|
258 |
+
provider_name varchar(50) NOT NULL,
|
259 |
+
identifier varchar(255) NOT NULL,
|
260 |
+
unique_verifier varchar(255) NOT NULL,
|
261 |
+
email varchar(255) NOT NULL,
|
262 |
+
email_verified varchar(255) NOT NULL,
|
263 |
+
first_name varchar(150) NOT NULL,
|
264 |
+
last_name varchar(150) NOT NULL,
|
265 |
+
profile_url varchar(255) NOT NULL,
|
266 |
+
website_url varchar(255) NOT NULL,
|
267 |
+
photo_url varchar(255) NOT NULL,
|
268 |
+
display_name varchar(150) NOT NULL,
|
269 |
+
description varchar(255) NOT NULL,
|
270 |
+
gender varchar(10) NOT NULL,
|
271 |
+
language varchar(20) NOT NULL,
|
272 |
+
age varchar(10) NOT NULL,
|
273 |
+
birthday int(11) NOT NULL,
|
274 |
+
birthmonth int(11) NOT NULL,
|
275 |
+
birthyear int(11) NOT NULL,
|
276 |
+
phone varchar(75) NOT NULL,
|
277 |
+
address varchar(255) NOT NULL,
|
278 |
+
country varchar(75) NOT NULL,
|
279 |
+
region varchar(50) NOT NULL,
|
280 |
+
city varchar(50) NOT NULL,
|
281 |
+
zip varchar(25) NOT NULL,
|
282 |
+
UNIQUE KEY id (id),
|
283 |
+
KEY user_id (user_id),
|
284 |
+
KEY provider_name (provider_name)
|
285 |
+
)";
|
286 |
+
dbDelta( $sql );
|
287 |
}
|
288 |
+
|
289 |
//loads the text domain for translation
|
290 |
function plugin_text_domain() {
|
291 |
load_plugin_textdomain( 'accesspress-social-login-lite', false, APSL_LANG_DIR );
|
382 |
die( 'No script kiddies please!' );
|
383 |
}
|
384 |
}
|
385 |
+
|
386 |
+
function apsl_delete_user( $user_id ) {
|
387 |
+
global $wpdb;
|
388 |
+
$table_name = $apsl_userdetails = "{$wpdb->prefix}apsl_users_social_profile_details";
|
389 |
+
$user_obj = get_userdata( $user_id );
|
390 |
+
$result = $wpdb->delete( $table_name, array( 'user_id' => $user_id ) );
|
391 |
+
}
|
392 |
} //class termination
|
393 |
|
394 |
}
|
inc/frontend/login_check.php
CHANGED
@@ -44,23 +44,43 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
44 |
$response = new stdClass();
|
45 |
$result = $this->facebookLogin( $response );
|
46 |
if( isset( $result->status ) == 'SUCCESS' ) {
|
47 |
-
|
48 |
-
$
|
49 |
-
|
|
|
50 |
if( !$row ) {
|
51 |
-
|
52 |
-
$
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
-
$this->loginUser( $row->ID );
|
64 |
}
|
65 |
}
|
66 |
|
@@ -195,21 +215,47 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
195 |
function onTwitterLogin() {
|
196 |
$result = $this->twitterLogin();
|
197 |
if( isset( $result->status ) == 'SUCCESS' ) {
|
198 |
-
|
199 |
-
$
|
|
|
|
|
200 |
if( !$row ) {
|
201 |
-
|
202 |
-
$
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
-
|
|
|
|
|
213 |
}
|
214 |
}
|
215 |
|
@@ -286,8 +332,8 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
286 |
$response->email = $user_profile->screen_name . '@twitter.com';
|
287 |
$response->username = strtolower($user_profile->screen_name);
|
288 |
$response->url = $user_profile->url;
|
289 |
-
$response->about = $user_profile->description;
|
290 |
-
$response->gender = $user_profile->gender;
|
291 |
$response->location = $user_profile->location;
|
292 |
$response->error_message = '';
|
293 |
}
|
@@ -315,21 +361,63 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
315 |
$result = $this->GoogleLogin();
|
316 |
// echo "<pre>";
|
317 |
if( isset( $result->status ) == 'SUCCESS' ) {
|
318 |
-
$row = $this->getUserByMail( $result->email );
|
319 |
-
$options = get_option( APSL_SETTINGS );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
if( !$row ) {
|
321 |
-
|
322 |
-
$
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
}
|
332 |
-
|
|
|
|
|
333 |
}
|
334 |
}
|
335 |
|
@@ -614,6 +702,101 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
614 |
$property->setAccessible( true );
|
615 |
return $property->getValue( $obj );
|
616 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
} //termination of a class
|
618 |
|
619 |
} //end of if statement
|
44 |
$response = new stdClass();
|
45 |
$result = $this->facebookLogin( $response );
|
46 |
if( isset( $result->status ) == 'SUCCESS' ) {
|
47 |
+
global $wpdb;
|
48 |
+
$unique_verifier = sha1($result->deutype.$result->deuid);
|
49 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}apsl_users_social_profile_details` WHERE `provider_name` LIKE '$result->deutype' AND `identifier` LIKE '$result->deuid' AND `unique_verifier` LIKE '$unique_verifier'";
|
50 |
+
$row = $wpdb->get_row($sql);
|
51 |
if( !$row ) {
|
52 |
+
//check if there is already a user with the email address provided from social login already
|
53 |
+
$user_details_by_email = $this->getUserByMail($result->email);
|
54 |
+
if( $user_details_by_email != false ){
|
55 |
+
//user already there so log him in
|
56 |
+
$id = $user_details_by_email->ID;
|
57 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}apsl_users_social_profile_details` WHERE `user_id` LIKE '$id'; ";
|
58 |
+
$row = $wpdb->get_row($sql);
|
59 |
+
if(!$row){
|
60 |
+
self:: link_user($id, $result);
|
61 |
+
}
|
62 |
+
self:: loginUser( $id );
|
63 |
+
die();
|
64 |
+
}
|
65 |
+
$_SESSION['user_details']= $result;
|
66 |
+
self::creatUser( $result->username, $result->email );
|
67 |
+
$user_row = self:: getUserByMail( $result->email );
|
68 |
+
$id = $user_row->ID;
|
69 |
+
$result = $result;
|
70 |
+
$role = 'subscriber';
|
71 |
+
self:: UpdateUserMeta( $id, $result, $role );
|
72 |
+
self:: loginUser( $id );
|
73 |
+
exit();
|
74 |
+
}else{
|
75 |
+
if( ($row->provider_name == $result->deutype) && ($row->identifier == $result->deuid) ){
|
76 |
+
//echo "user found in our database";
|
77 |
+
self:: loginUser( $row->user_id );
|
78 |
+
exit();
|
79 |
+
}else{
|
80 |
+
// user not found in our database
|
81 |
+
// need to handle an exception
|
82 |
+
}
|
83 |
}
|
|
|
84 |
}
|
85 |
}
|
86 |
|
215 |
function onTwitterLogin() {
|
216 |
$result = $this->twitterLogin();
|
217 |
if( isset( $result->status ) == 'SUCCESS' ) {
|
218 |
+
global $wpdb;
|
219 |
+
$unique_verifier = sha1($result->deutype.$result->deuid);
|
220 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}apsl_users_social_profile_details` WHERE `provider_name` LIKE '$result->deutype' AND `identifier` LIKE '$result->deuid' AND `unique_verifier` LIKE '$unique_verifier'";
|
221 |
+
$row = $wpdb->get_row($sql);
|
222 |
if( !$row ) {
|
223 |
+
//check if there is already a user with the email address provided from social login already
|
224 |
+
$user_details_by_email = $this->getUserByMail($result->email);
|
225 |
+
if( $user_details_by_email != false ){
|
226 |
+
//user already there so log him in
|
227 |
+
$id = $user_details_by_email->ID;
|
228 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}apsl_users_social_profile_details` WHERE `user_id` LIKE '$id'; ";
|
229 |
+
$row = $wpdb->get_row($sql);
|
230 |
+
// var_dump($row);
|
231 |
+
if(!$row){
|
232 |
+
self:: link_user($id, $result);
|
233 |
+
}
|
234 |
+
self:: loginUser( $id );
|
235 |
+
die();
|
236 |
+
}
|
237 |
+
$_SESSION['user_details']= $result;
|
238 |
+
self::creatUser( $result->username, $result->email );
|
239 |
+
$user_row = self:: getUserByMail( $result->email );
|
240 |
+
$id = $user_row->ID;
|
241 |
+
$result = $result;
|
242 |
+
$role = 'subscriber';
|
243 |
+
self:: UpdateUserMeta( $id, $result, $role );
|
244 |
+
self:: loginUser( $id );
|
245 |
+
exit();
|
246 |
+
}else{
|
247 |
+
if( ($row->provider_name == $result->deutype) && ($row->identifier == $result->deuid) ){
|
248 |
+
//echo "user found in our database";
|
249 |
+
self:: loginUser( $row->user_id );
|
250 |
+
exit();
|
251 |
+
}else{
|
252 |
+
// user not found in our database
|
253 |
+
// need to handle an exception
|
254 |
+
}
|
255 |
}
|
256 |
+
}else{
|
257 |
+
echo "failure";
|
258 |
+
die();
|
259 |
}
|
260 |
}
|
261 |
|
332 |
$response->email = $user_profile->screen_name . '@twitter.com';
|
333 |
$response->username = strtolower($user_profile->screen_name);
|
334 |
$response->url = $user_profile->url;
|
335 |
+
$response->about = isset($user_profile->description) ? $user_profile->description : '';
|
336 |
+
$response->gender = isset($user_profile->gender) ? $user_profile->gender : 'N/A';
|
337 |
$response->location = $user_profile->location;
|
338 |
$response->error_message = '';
|
339 |
}
|
361 |
$result = $this->GoogleLogin();
|
362 |
// echo "<pre>";
|
363 |
if( isset( $result->status ) == 'SUCCESS' ) {
|
364 |
+
// $row = $this->getUserByMail( $result->email );
|
365 |
+
// $options = get_option( APSL_SETTINGS );
|
366 |
+
// if( !$row ) {
|
367 |
+
// $this->creatUser( $result->username, $result->email );
|
368 |
+
// $row = $this->getUserByMail( $result->email );
|
369 |
+
// update_user_meta( $row->ID, 'email', $result->email );
|
370 |
+
// update_user_meta( $row->ID, 'first_name', $result->first_name );
|
371 |
+
// update_user_meta( $row->ID, 'last_name', $result->last_name );
|
372 |
+
// update_user_meta( $row->ID, 'deuid', $result->deuid );
|
373 |
+
// update_user_meta( $row->ID, 'deutype', $result->deutype );
|
374 |
+
// update_user_meta( $row->ID, 'deuimage', $result->deuimage );
|
375 |
+
// update_user_meta( $row->ID, 'description', $result->about );
|
376 |
+
// wp_update_user( array('ID' => $row->ID, 'display_name' => $result->first_name, 'role' => 'subscriber', 'user_url' => $result->url) );
|
377 |
+
// }
|
378 |
+
// $this->loginUser( $row->ID );
|
379 |
+
//
|
380 |
+
global $wpdb;
|
381 |
+
$unique_verifier = sha1($result->deutype.$result->deuid);
|
382 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}apsl_users_social_profile_details` WHERE `provider_name` LIKE '$result->deutype' AND `identifier` LIKE '$result->deuid' AND `unique_verifier` LIKE '$unique_verifier'";
|
383 |
+
$row = $wpdb->get_row($sql);
|
384 |
if( !$row ) {
|
385 |
+
//check if there is already a user with the email address provided from social login already
|
386 |
+
$user_details_by_email = $this->getUserByMail($result->email);
|
387 |
+
if( $user_details_by_email != false ){
|
388 |
+
//user already there so log him in
|
389 |
+
$id = $user_details_by_email->ID;
|
390 |
+
$sql = "SELECT * FROM `{$wpdb->prefix}apsl_users_social_profile_details` WHERE `user_id` LIKE '$id'; ";
|
391 |
+
$row = $wpdb->get_row($sql);
|
392 |
+
// var_dump($row);
|
393 |
+
if(!$row){
|
394 |
+
self:: link_user($id, $result);
|
395 |
+
}
|
396 |
+
self:: loginUser( $id );
|
397 |
+
die();
|
398 |
+
}
|
399 |
+
$_SESSION['user_details']= $result;
|
400 |
+
self::creatUser( $result->username, $result->email );
|
401 |
+
$user_row = self:: getUserByMail( $result->email );
|
402 |
+
$id = $user_row->ID;
|
403 |
+
$result = $result;
|
404 |
+
$role = 'subscriber';
|
405 |
+
self:: UpdateUserMeta( $id, $result, $role );
|
406 |
+
self:: loginUser( $id );
|
407 |
+
exit();
|
408 |
+
}else{
|
409 |
+
if( ($row->provider_name == $result->deutype) && ($row->identifier == $result->deuid) ){
|
410 |
+
//echo "user found in our database";
|
411 |
+
self:: loginUser( $row->user_id );
|
412 |
+
exit();
|
413 |
+
}else{
|
414 |
+
// user not found in our database
|
415 |
+
// need to handle an exception
|
416 |
+
}
|
417 |
}
|
418 |
+
}else{
|
419 |
+
echo "failure";
|
420 |
+
die();
|
421 |
}
|
422 |
}
|
423 |
|
702 |
$property->setAccessible( true );
|
703 |
return $property->getValue( $obj );
|
704 |
}
|
705 |
+
|
706 |
+
|
707 |
+
//insert the user data into plugin's custom database
|
708 |
+
static function link_user($id, $result){
|
709 |
+
global $wpdb;
|
710 |
+
$unique_verifier = sha1($result->deutype.$result->deuid);
|
711 |
+
$apsl_userdetails = "{$wpdb->prefix}apsl_users_social_profile_details";
|
712 |
+
|
713 |
+
$first_name = sanitize_text_field($result->first_name);
|
714 |
+
$last_name = sanitize_text_field($result->last_name);
|
715 |
+
$profile_url = sanitize_text_field($result->url);
|
716 |
+
$photo_url = sanitize_text_field( $result->deuimage);
|
717 |
+
$display_name = sanitize_text_field( $result->first_name . ' ' . $result->last_name);
|
718 |
+
$description = sanitize_text_field($result->about);
|
719 |
+
|
720 |
+
$table_name = $apsl_userdetails;
|
721 |
+
$submit_array = array(
|
722 |
+
"user_id" => $id,
|
723 |
+
"provider_name" => $result->deutype,
|
724 |
+
"identifier" => $result->deuid,
|
725 |
+
"unique_verifier" => $unique_verifier,
|
726 |
+
"email" => $result->email,
|
727 |
+
"first_name" => $first_name,
|
728 |
+
"last_name" => $last_name,
|
729 |
+
"profile_url" =>$profile_url,
|
730 |
+
"photo_url" =>$photo_url,
|
731 |
+
"display_name" =>$display_name,
|
732 |
+
"description" =>$description,
|
733 |
+
"gender" =>$result->gender
|
734 |
+
);
|
735 |
+
$user_profile_details = $result;
|
736 |
+
$wpdb->insert($table_name, $submit_array );
|
737 |
+
if(!$result){
|
738 |
+
echo "Data insertion failed";
|
739 |
+
// die(mysql_error());
|
740 |
+
}
|
741 |
+
}
|
742 |
+
|
743 |
+
//update the user meta data
|
744 |
+
static function UpdateUserMeta( $id, $result, $role ) {
|
745 |
+
update_user_meta( $id, 'email', $result->email );
|
746 |
+
update_user_meta( $id, 'first_name', $result->first_name );
|
747 |
+
update_user_meta( $id, 'last_name', $result->last_name );
|
748 |
+
update_user_meta( $id, 'billing_first_name', $result->first_name );
|
749 |
+
update_user_meta( $id, 'billing_last_name', $result->last_name );
|
750 |
+
update_user_meta( $id, 'deuid', $result->deuid );
|
751 |
+
update_user_meta( $id, 'deutype', $result->deutype );
|
752 |
+
update_user_meta( $id, 'deuimage', $result->deuimage );
|
753 |
+
update_user_meta( $id, 'description', $result->about );
|
754 |
+
update_user_meta( $id, 'sex', $result->gender );
|
755 |
+
wp_update_user( array(
|
756 |
+
'ID' => $id,
|
757 |
+
'display_name' => $result->first_name . ' ' . $result->last_name,
|
758 |
+
// 'role' => $role,
|
759 |
+
'user_url' => $result->url
|
760 |
+
) );
|
761 |
+
|
762 |
+
global $wpdb;
|
763 |
+
$unique_verifier = sha1($result->deutype.$result->deuid);
|
764 |
+
$apsl_userdetails = "{$wpdb->prefix}apsl_users_social_profile_details";
|
765 |
+
|
766 |
+
$first_name = sanitize_text_field($result->first_name);
|
767 |
+
$last_name = sanitize_text_field($result->last_name);
|
768 |
+
$profile_url = sanitize_text_field($result->url);
|
769 |
+
$photo_url = sanitize_text_field( $result->deuimage);
|
770 |
+
$display_name = sanitize_text_field( $result->first_name . ' ' . $result->last_name);
|
771 |
+
$description = sanitize_text_field($result->about);
|
772 |
+
|
773 |
+
$table_name = $apsl_userdetails;
|
774 |
+
$submit_array = array(
|
775 |
+
"user_id" => $id,
|
776 |
+
"provider_name" => $result->deutype,
|
777 |
+
"identifier" => $result->deuid,
|
778 |
+
"unique_verifier" => $unique_verifier,
|
779 |
+
"email" => $result->email,
|
780 |
+
"first_name" => $first_name,
|
781 |
+
"last_name" => $last_name,
|
782 |
+
"profile_url" =>$profile_url,
|
783 |
+
"photo_url" =>$photo_url,
|
784 |
+
"display_name" =>$display_name,
|
785 |
+
"description" =>$description,
|
786 |
+
"gender" =>$result->gender
|
787 |
+
);
|
788 |
+
$user_profile_details = $result;
|
789 |
+
$wpdb->insert($table_name, $submit_array );
|
790 |
+
|
791 |
+
if(function_exists('bp_has_profile')){
|
792 |
+
self:: apsl_buddypress_xprofile_mapping($id, $user_profile_details->deutype, $user_profile_details);
|
793 |
+
}
|
794 |
+
if(!$result){
|
795 |
+
echo "Data insertion failed";
|
796 |
+
// die(mysql_error());
|
797 |
+
}
|
798 |
+
}
|
799 |
+
|
800 |
} //termination of a class
|
801 |
|
802 |
} //end of if statement
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: social, login, social login, facebook, twitter, google, social connect, s
|
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.5
|
7 |
-
Stable tag: 3.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -133,6 +133,11 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
|
|
133 |
4. Backend Other settings Section.
|
134 |
|
135 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
136 |
= 3.1.0 =
|
137 |
* Done the bug fixings for the google login.
|
138 |
* Done the bug fixings for the username repeate issue.
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.5
|
7 |
+
Stable tag: 3.1.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
133 |
4. Backend Other settings Section.
|
134 |
|
135 |
== Changelog ==
|
136 |
+
= 3.1.1 =
|
137 |
+
* Done small bug fixings for twitter user fields.
|
138 |
+
* Addition of the social login in the woocommerce login form.
|
139 |
+
* Done the bug fixings regarding the user login issue when user change email address.
|
140 |
+
|
141 |
= 3.1.0 =
|
142 |
* Done the bug fixings for the google login.
|
143 |
* Done the bug fixings for the username repeate issue.
|