WordPress.org

Make WordPress Core

Ticket #10268: 10268.diff

File 10268.diff, 1.4 KB (added by Denis-de-Bernardy, 5 years ago)
  • wp-admin/user-new.php

     
    99/** WordPress Administration Bootstrap */ 
    1010require_once('admin.php'); 
    1111 
     12// Redirect to https login if forced to use SSL 
     13if ( force_ssl_login() && !is_ssl() ) { 
     14        if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { 
     15                wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI'])); 
     16                exit(); 
     17        } else { 
     18                wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     19                exit(); 
     20        } 
     21} 
     22 
    1223if ( !current_user_can('create_users') ) 
    1324        wp_die(__('Cheatin’ uh?')); 
    1425 
  • wp-admin/user-edit.php

     
    99/** WordPress Administration Bootstrap */ 
    1010require_once('admin.php'); 
    1111 
     12// Redirect to https login if forced to use SSL 
     13if ( force_ssl_login() && !is_ssl() ) { 
     14        if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) { 
     15                wp_redirect(preg_replace('|^http://|', 'https://', $_SERVER['REQUEST_URI'])); 
     16                exit(); 
     17        } else { 
     18                wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 
     19                exit(); 
     20        } 
     21} 
     22 
    1223if ( !defined('IS_PROFILE_PAGE') ) 
    1324        define('IS_PROFILE_PAGE', false); 
    1425