summaryrefslogtreecommitdiffstats
path: root/wp-content/mu-plugins
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-10-09 11:39:17 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-10-09 11:39:17 +0000
commit75e0ccc3a64e164d036da4f71f458520ddea3b24 (patch)
tree94f00db692e25c95030f7984c27178e1bd7e1bcd /wp-content/mu-plugins
parentca036ad95fc44c318275ab539a52f1eb6fddf060 (diff)
downloadwordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.gz
wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.tar.xz
wordpress-mu-75e0ccc3a64e164d036da4f71f458520ddea3b24.zip
WP Merge - needs testing.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@797 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-content/mu-plugins')
-rw-r--r--wp-content/mu-plugins/pluggable.php28
1 files changed, 12 insertions, 16 deletions
diff --git a/wp-content/mu-plugins/pluggable.php b/wp-content/mu-plugins/pluggable.php
index f1cf497..7990a3a 100644
--- a/wp-content/mu-plugins/pluggable.php
+++ b/wp-content/mu-plugins/pluggable.php
@@ -42,14 +42,11 @@ function wp_login($username, $password, $already_md5 = false) {
$error = __('<strong>Error</strong>: Wrong username.');
return false;
} else {
- $primary_blog = get_usermeta( $login->ID, "primary_blog" );
- if( $primary_blog ) {
+ if( is_site_admin( $username ) == false && ( $primary_blog = get_usermeta( $login->ID, "primary_blog" ) ) ) {
$details = get_blog_details( $primary_blog );
- if( is_object( $details ) ) {
- if( $details->archived == 1 || $details->spam == 1 || $details->deleted == 1 ) {
- $error = __('<strong>Error</strong>: Blog suspended.');
- return false;
- }
+ if( is_object( $details ) && $details->archived == 1 || $details->spam == 1 || $details->deleted == 1 ) {
+ $error = __('<strong>Error</strong>: Blog suspended.');
+ return false;
}
}
// If the password is already_md5, it has been double hashed.
@@ -72,15 +69,14 @@ function get_userdata( $user_id ) {
$user = wp_cache_get($user_id, 'users');
$user_level = $wpmuBaseTablePrefix . $wpdb->blogid . '_user_level';
- if( $user->$user_level != '' || $user->user_level != '' ) {
- if( $user && is_site_admin( $user->user_login ) == true ) {
- $user->$user_level = 10;
- $user->user_level = 10;
- $cap_key = $wpdb->prefix . 'capabilities';
- $user->{$cap_key} = array( 'administrator' => '1' );
- return $user;
- } elseif ( $user )
- return $user;
+ if ( $user && is_site_admin( $user->user_login ) ) {
+ $user->$user_level = 10;
+ $user->user_level = 10;
+ $cap_key = $wpdb->prefix . 'capabilities';
+ $user->{$cap_key} = array( 'administrator' => '1' );
+ return $user;
+ } elseif ( $user ) {
+ return $user;
}
if ( !$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$user_id'") )