Version Description
- Done the update of the user notification function to latest.
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Login WordPress Plugin – AccessPress Social Login Lite |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.9 to 3.0.0
- accesspress-social-login-lite.php +49 -32
- inc/frontend/login_check.php +19 -19
- readme.txt +4 -1
accesspress-social-login-lite.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin name: 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:
|
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', '
|
16 |
}
|
17 |
|
18 |
if( !defined( 'APSL_IMAGE_DIR' ) ) {
|
@@ -48,37 +48,54 @@ if( !defined( 'APSL_PLUGIN_DIR' ) ) {
|
|
48 |
*/
|
49 |
include_once( 'inc/backend/widget.php' );
|
50 |
// Redefine user notification function
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
return;
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
|
|
|
|
82 |
}
|
83 |
}
|
84 |
// Declaration of the class
|
3 |
Plugin name: 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.0.0
|
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.0.0' );
|
16 |
}
|
17 |
|
18 |
if( !defined( 'APSL_IMAGE_DIR' ) ) {
|
48 |
*/
|
49 |
include_once( 'inc/backend/widget.php' );
|
50 |
// Redefine user notification function
|
51 |
+
// Redefine user notification function
|
52 |
+
if ( !function_exists('wp_new_user_notification') ) {
|
53 |
+
|
54 |
+
function wp_new_user_notification( $user_id, $deprecated = null, $notify = 'both' ) {
|
55 |
+
if ( $deprecated !== null ) {
|
56 |
+
_deprecated_argument( __FUNCTION__, '4.3.1' );
|
57 |
+
}
|
58 |
+
|
59 |
+
global $wpdb, $wp_hasher;
|
60 |
+
$user = get_userdata( $user_id );
|
61 |
+
|
62 |
+
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
|
63 |
+
// we want to reverse this for the plain text arena of emails.
|
64 |
+
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
|
65 |
+
|
66 |
+
$message = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
|
67 |
+
$message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
|
68 |
+
$message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";
|
69 |
+
|
70 |
+
@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
|
71 |
+
|
72 |
+
if ( 'admin' === $notify || empty( $notify ) ) {
|
73 |
return;
|
74 |
+
}
|
75 |
+
|
76 |
+
// Generate something random for a password reset key.
|
77 |
+
$key = wp_generate_password( 20, false );
|
78 |
+
|
79 |
+
/** This action is documented in wp-login.php */
|
80 |
+
do_action( 'retrieve_password_key', $user->user_login, $key );
|
81 |
+
|
82 |
+
// Now insert the key, hashed, into the DB.
|
83 |
+
if ( empty( $wp_hasher ) ) {
|
84 |
+
require_once ABSPATH . WPINC . '/class-phpass.php';
|
85 |
+
$wp_hasher = new PasswordHash( 8, true );
|
86 |
+
}
|
87 |
+
$hashed = time() . ':' . $wp_hasher->HashPassword( $key );
|
88 |
+
$wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
|
89 |
+
|
90 |
+
$message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
|
91 |
+
$message .= __('To set your password, visit the following address:') . "\r\n\r\n";
|
92 |
+
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";
|
93 |
+
|
94 |
+
$message .= wp_login_url() . "\r\n\r\n";
|
95 |
+
$message .= sprintf( __('If you have any problems, please contact us at %s.'), get_option('admin_email') ) . "\r\n\r\n";
|
96 |
+
$message .= __('Adios!') . "\r\n\r\n";
|
97 |
+
|
98 |
+
wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message);
|
99 |
}
|
100 |
}
|
101 |
// Declaration of the class
|
inc/frontend/login_check.php
CHANGED
@@ -464,30 +464,30 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
464 |
}
|
465 |
}
|
466 |
// Redefine user notification function
|
467 |
-
function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
|
468 |
-
|
469 |
|
470 |
-
|
471 |
-
|
472 |
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
|
477 |
-
|
478 |
|
479 |
-
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
|
489 |
-
|
490 |
-
}
|
491 |
|
492 |
function getUserByMail( $email ) {
|
493 |
global $wpdb;
|
@@ -513,7 +513,7 @@ if( !class_exists( 'APSL_Lite_Login_Check_Class' ) ) {
|
|
513 |
do_action( 'APSL_createUser', $user_id ); //hookable function to perform additional work after creation of user.
|
514 |
$options = get_option( APSL_SETTINGS );
|
515 |
if( $options['apsl_send_email_notification_options'] == 'yes' ) {
|
516 |
-
wp_new_user_notification( $user_id, $random_password );
|
517 |
}
|
518 |
return $user_id;
|
519 |
}
|
464 |
}
|
465 |
}
|
466 |
// Redefine user notification function
|
467 |
+
// function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
|
468 |
+
// $user = new WP_User( $user_id );
|
469 |
|
470 |
+
// $user_login = stripslashes( $user->user_login );
|
471 |
+
// $user_email = stripslashes( $user->user_email );
|
472 |
|
473 |
+
// $message = sprintf( __( 'New user registration on your blog %s:' ), get_option( 'blogname' ) ) . "\r\n\r\n";
|
474 |
+
// $message.= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n\r\n";
|
475 |
+
// $message.= sprintf( __( 'E-mail: %s' ), $user_email ) . "\r\n";
|
476 |
|
477 |
+
// @wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] New User Registration' ), get_option( 'blogname' ) ), $message );
|
478 |
|
479 |
+
// if( empty( $plaintext_pass ) )return;
|
480 |
|
481 |
+
// $message = __( 'Hi there,' ) . "\r\n\r\n";
|
482 |
+
// $message.= sprintf( __( "Welcome to %s! Here's how to log in:" ), get_option( 'blogname' ) ) . "\r\n\r\n";
|
483 |
+
// $message.= wp_login_url() . "\r\n";
|
484 |
+
// $message.= sprintf( __( 'Username: %s' ), $user_login ) . "\r\n";
|
485 |
+
// $message.= sprintf( __( 'Password: %s' ), $plaintext_pass ) . "\r\n\r\n";
|
486 |
+
// $message.= sprintf( __( 'If you have any problems, please contact me at %s.' ), get_option( 'admin_email' ) ) . "\r\n\r\n";
|
487 |
+
// $message.= __( 'Adios!' );
|
488 |
|
489 |
+
// wp_mail( $user_email, sprintf( __( '[%s] Your username and password' ), get_option( 'blogname' ) ), $message );
|
490 |
+
// }
|
491 |
|
492 |
function getUserByMail( $email ) {
|
493 |
global $wpdb;
|
513 |
do_action( 'APSL_createUser', $user_id ); //hookable function to perform additional work after creation of user.
|
514 |
$options = get_option( APSL_SETTINGS );
|
515 |
if( $options['apsl_send_email_notification_options'] == 'yes' ) {
|
516 |
+
wp_new_user_notification( $user_id, $random_password, 'both' );
|
517 |
}
|
518 |
return $user_id;
|
519 |
}
|
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.3
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -131,6 +131,9 @@ Yes. You can use the AccessPress social login lite anywhere by using shortcode i
|
|
131 |
4. Backend Other settings Section.
|
132 |
|
133 |
== Changelog ==
|
|
|
|
|
|
|
134 |
= 2.0.9 =
|
135 |
* Done the bug fixing for the facebook login with the newer api version v2.5.
|
136 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 3.0.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
131 |
4. Backend Other settings Section.
|
132 |
|
133 |
== Changelog ==
|
134 |
+
= 3.0.0 =
|
135 |
+
* Done the update of the user notification function to latest.
|
136 |
+
|
137 |
= 2.0.9 =
|
138 |
* Done the bug fixing for the facebook login with the newer api version v2.5.
|
139 |
|