Changeset 2230431
- Timestamp:
- 01/20/2020 04:02:46 PM (6 years ago)
- Location:
- superauth
- Files:
-
- 7 added
- 3 edited
-
tags/1.1.3 (added)
-
tags/1.1.3/assets (added)
-
tags/1.1.3/assets/css (added)
-
tags/1.1.3/assets/css/style.css (added)
-
tags/1.1.3/readme.txt (added)
-
tags/1.1.3/superauth-login-template.php (added)
-
tags/1.1.3/superauth.php (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/superauth-login-template.php (modified) (4 diffs)
-
trunk/superauth.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
superauth/trunk/readme.txt
r2193729 r2230431 4 4 Tags: username, password, passwords, no, fingerprint, superauth, auth, web, app, login, push, notification, android, iOS, windows, iPhone, iPad, phone, mobile, smartphone, computer, oauth, sso, authentication, encryption, ssl, secure, security, strong, harden, single sign-on, signon, signup, signin, login, log in, wp-login, 2 step authentication, two-factor authentication, two step, two factor, 2-Factor, 2fa, two, tfa, mfa, qr, multi-factor, multifactor 5 5 Requires at least: 4.7.0 6 Tested up to: 5.3 7 Stable tag: 1.1. 26 Tested up to: 5.3.2 7 Stable tag: 1.1.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 118 118 == Upgrade Notice == 119 119 120 = 1.1.3 = 121 * Improved performance. 122 120 123 = 1.1.2 = 121 124 * Improved performance. -
superauth/trunk/superauth-login-template.php
r1909201 r2230431 6 6 $redirect_to = home_url(); 7 7 8 /**logout test***/ 9 /*if(isset($_GET['logoutemail'])){ 10 $logoutemail = $_GET['logoutemail']; 11 $user = get_user_by('email', $logoutemail ); 12 if ( !is_wp_error( $user ) ) { 13 // get all sessions for user with ID $user_id 14 $sessions = WP_Session_Tokens::get_instance($user->ID); 15 // we have got the sessions, destroy them all! 16 $sessions->destroy_all(); 17 } 18 }*/ 19 8 20 /*check state id matches */ 9 21 if(session_id()) { 10 22 if(isset($_SESSION['superauthloginstate'])){ //session has state value 11 $superauthloginstate = str_replace("-","",wp_generate_uuid4()) ; 23 //$superauthloginstate = str_replace("-","",wp_generate_uuid4()) ; 24 $superauthloginstate = $_SESSION['superauthloginstate']; 12 25 if(isset($_GET['state'])){ //get from query 13 26 if (strcmp($superauthloginstate, $_GET['state']) != 0) { … … 62 75 $user_name = superauth_create_username(compact('first_name', 'last_name')); 63 76 64 if ( email_exists($user_email) == false ) { 65 //register user 66 $user_pass = wp_generate_password( $length=12, $include_standard_special_chars=false ); 67 //$user_id = wp_create_user( $user_name, $user_pass, $user_email ); 77 if ( email_exists($user_email) == false) { 78 if (get_option( 'users_can_register' ) ) { 79 //register user 80 $user_pass = wp_generate_password( $length=12, $include_standard_special_chars=false ); 81 //$user_id = wp_create_user( $user_name, $user_pass, $user_email ); 68 82 69 $user_login = $user_name;70 $userdata = compact('user_login', 'user_email', 'user_pass', 'first_name', 'last_name');83 $user_login = $user_name; 84 $userdata = compact('user_login', 'user_email', 'user_pass', 'first_name', 'last_name'); 71 85 $user_id = wp_insert_user($userdata); 72 if($user_id) { 73 superauth_authenticate_user_by_id($user_id); 74 } 86 if($user_id) { 87 superauth_authenticate_user_by_id($user_id); 88 } 89 } 75 90 } else { 76 91 //for login … … 93 108 wp_set_current_user( $userId, $user->user_login ); 94 109 wp_set_auth_cookie( $userId ); 95 do_action( 'wp_login', $user->user_login );110 do_action( 'wp_login', $user->user_login, $user ); 96 111 } 97 112 wp_safe_redirect(home_url()); … … 111 126 $username .= '_' . $lname; 112 127 113 //echo '<div>FIRST: '.$username.'</div>' ;128 //echo '<div>FIRST: '.$username.'</div>'1; 114 129 115 130 $username_to_check = $username; -
superauth/trunk/superauth.php
r1909201 r2230431 3 3 * Plugin Name: SuperAuth 4 4 * Description: SuperAuth is a revolutionary application that enables your users to safely log in to your websites or apps without typing a username or password. You can easily add or remove SuperAuth function without disturbing your user management. SuperAuth also ensures that your site is secure and protected from phishing. 5 * Version: 1.1. 25 * Version: 1.1.3 6 6 * Author: SuperAuth 7 7 */ 8 8 session_start(); 9 9 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 10 10 … … 241 241 $display = ''; 242 242 /*create state value */ 243 if(!session_id()) {243 /*if(!session_id()) { 244 244 session_start(); 245 } 245 }*/ 246 246 if(session_id()) { 247 247 $superauthloginstate = wp_generate_uuid4(); … … 267 267 function superauth_login_form_override() { 268 268 /*create state value */ 269 if(!session_id()) { 269 //if(!session_id()) { 270 /*if ( PHP_SESSION_NONE === session_status() ) { 270 271 session_start(); 271 } 272 }*/ 272 273 if(session_id()) { 273 274 $superauthloginstate = wp_generate_uuid4();
Note: See TracChangeset
for help on using the changeset viewer.