summaryrefslogtreecommitdiffstats
path: root/wp-includes/wpmu-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-18 15:12:11 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-18 15:12:11 +0000
commit8d3dc07abb2aaadd2b7356eda6dead3fe385b314 (patch)
treee92485cea5594e01ea098a28a34840bb237502ba /wp-includes/wpmu-functions.php
parent8b092851f3de4a7089b7427a03def8e128f5931c (diff)
downloadwordpress-mu-8d3dc07abb2aaadd2b7356eda6dead3fe385b314.tar.gz
wordpress-mu-8d3dc07abb2aaadd2b7356eda6dead3fe385b314.tar.xz
wordpress-mu-8d3dc07abb2aaadd2b7356eda6dead3fe385b314.zip
Check that user isn't a site_admin before deleting their blog 1 perms, fixes #536
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1246 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r--wp-includes/wpmu-functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 14533ef..85f8c57 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1389,7 +1389,7 @@ function install_blog_defaults($blog_id, $user_id) {
$wpdb->query( "DELETE FROM ".$wpdb->usermeta." WHERE user_id != '".$user_id."' AND meta_key = '".$table_prefix."user_level'" );
$wpdb->query( "DELETE FROM ".$wpdb->usermeta." WHERE user_id != '".$user_id."' AND meta_key = '".$table_prefix."capabilities'" );
// Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
- if ( $user_id != 1 )
+ if ( !is_site_admin( $user->user_login ) && $user_id != 1 )
$wpdb->query( "DELETE FROM ".$wpdb->usermeta." WHERE user_id = '".$user_id."' AND meta_key = '" . $wpdb->base_prefix . "1_capabilities'" );
$wpdb->show_errors();