PluginProbe
Loginizer / 2.0.2
Loginizer v2.0.2
2.1.2 2.1.1 2.1.0 2.0.9 2.0.8 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.2.0 1.3.0 1.3.1 1.3.2 All 76 releases
← All changes | main/social-base.php +7 -6 2.0.4 → 2.0.2 View file →
@@ -94,11 +94,8 @@
94 94 }
95 95
96 96 update_user_option($user_id, 'default_password_nag', true, true); // This will show alert to user to change the password.
97 97 $user = get_user_by('ID', $user_id);
98 -
99 - // Following the default WordPress registration flow, we will notify user about the creation of new account.
100 - do_action('register_new_user', $user_id);
101 98
102 99 // Save avatar if possible.
103 100 $tried_to_download = get_user_meta($user->ID, 'loginizer_avatar_download', true);
104 101 if(!empty($data['photoURL']) && !empty($loginizer['social_settings']['general']['save_avatar']) && empty($tried_to_download)){
@@ -124,9 +121,8 @@
124 121 protected static function close_tab(){
125 122 global $loginizer;
126 123
127 124 // Check if the URL is safe to use.
128 - $redirect_to = '';
129 125 if(!empty(self::$ref)){
130 126 $redirect_to = self::handle_redirect(self::$ref);
131 127 }
132 128
@@ -292,10 +288,11 @@
292 288 }
293 289
294 290 protected static function handle_redirect($url){
295 291
292 + $redirect = '';
296 293 if(empty($url)){
297 - return '';
294 + return $redirect;
298 295 }
299 296
300 297 $url = rawurldecode($url);
301 298 $parsed_url = parse_url($url);
@@ -310,9 +307,13 @@
310 307 }
311 308
312 309 // Reloading the page wont show the admin page so we need to redirect it to the admin page.
313 310 if($parsed_url['scheme'].'://'.$parsed_url['host'] . $parsed_url['path'] == wp_login_url()){
314 - return admin_url();
311 + return $redirect;
312 + }
313 +
314 + if(strpos(wp_login_url(), $parsed_url['path']) !== FALSE){
315 + return $redirect;
315 316 }
316 317
317 318 // If none of the above happens then we will just make the page reload.
318 319 return $url;