summaryrefslogtreecommitdiffstats
path: root/wp-inst/wp-includes/pluggable-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-30 12:03:26 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-01-30 12:03:26 +0000
commit229ea6db0019536f1efea2dadfe3ad53284a9574 (patch)
tree723b7da1fc5c0b8629cc4176da19b5c80036d710 /wp-inst/wp-includes/pluggable-functions.php
parent7322c2da3ce036e18768aa2f79bc4897796b6ac8 (diff)
downloadwordpress-mu-229ea6db0019536f1efea2dadfe3ad53284a9574.tar.gz
wordpress-mu-229ea6db0019536f1efea2dadfe3ad53284a9574.tar.xz
wordpress-mu-229ea6db0019536f1efea2dadfe3ad53284a9574.zip
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@520 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-includes/pluggable-functions.php')
-rw-r--r--wp-inst/wp-includes/pluggable-functions.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/wp-inst/wp-includes/pluggable-functions.php b/wp-inst/wp-includes/pluggable-functions.php
index 921ccd4..c388e44 100644
--- a/wp-inst/wp-includes/pluggable-functions.php
+++ b/wp-inst/wp-includes/pluggable-functions.php
@@ -86,6 +86,14 @@ function get_userdata( $user_id ) {
} // end foreach
} //end if
+ // For backwards compat.
+ if ( isset($user->first_name) )
+ $user->user_firstname = $user->first_name;
+ if ( isset($user->last_name) )
+ $user->user_lastname = $user->last_name;
+ if ( isset($user->description) )
+ $user->user_description = $user->description;
+
wp_cache_add($user_id, $user, 'users');
wp_cache_add($user->user_login, $user, 'userlogins');
@@ -130,6 +138,15 @@ function get_userdatabylogin($user_login) {
$user->user_level = $meta->meta_value;
}
}
+
+ // For backwards compat.
+ if ( isset($user->first_name) )
+ $user->user_firstname = $user->first_name;
+ if ( isset($user->last_name) )
+ $user->user_lastname = $user->last_name;
+ if ( isset($user->description) )
+ $user->user_description = $user->description;
+
if( is_site_admin( $user_login ) == true ) {
$user->user_level = 10;
$cap_key = $wpdb->prefix . 'capabilities';
@@ -212,6 +229,16 @@ function auth_redirect() {
}
endif;
+if ( !function_exists('check_admin_referer') ) :
+function check_admin_referer() {
+ $adminurl = strtolower(get_settings('siteurl')).'/wp-admin';
+ $referer = strtolower($_SERVER['HTTP_REFERER']);
+ if (!strstr($referer, $adminurl))
+ die(__('Sorry, you need to <a href="http://codex.wordpress.org/Enable_Sending_Referrers">enable sending referrers</a> for this feature to work.'));
+ do_action('check_admin_referer');
+}
+endif;
+
// Cookie safe redirect. Works around IIS Set-Cookie bug.
// http://support.microsoft.com/kb/q176113/
if ( !function_exists('wp_redirect') ) :