Use get_current_user() and get_current_user_id() instead of global . Props filofo. see #13934 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@15315 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-06-24 15:01:29 +00:00
parent 3cd056320a
commit 494ee995b5
11 changed files with 56 additions and 62 deletions
+3 -2
View File
@@ -153,7 +153,8 @@ function validate_user_form() {
}
function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
global $current_user, $current_site;
global $current_site;
$current_user = wp_get_current_user();
if ( ! is_wp_error($errors) ) {
$errors = new WP_Error();
@@ -197,7 +198,7 @@ function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
}
function validate_another_blog_signup() {
global $wpdb, $current_user, $blogname, $blog_title, $errors, $domain, $path;
global $wpdb, $blogname, $blog_title, $errors, $domain, $path;
$current_user = wp_get_current_user();
if ( !is_user_logged_in() )
die();