Integrate wordpressmu_authenticate_siteadmin() into wp_authenticate_username_password(). see #11644
git-svn-id: http://svn.automattic.com/wordpress/trunk@12879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1747,15 +1747,6 @@ function upload_is_file_too_big( $upload ) {
|
||||
return $upload;
|
||||
}
|
||||
|
||||
function wordpressmu_authenticate_siteadmin( $user, $password = '' ) {
|
||||
if ( is_super_admin( $user->user_login ) == false && ( $primary_blog = get_usermeta( $user->user_id, "primary_blog" ) ) ) {
|
||||
$details = get_blog_details( $primary_blog );
|
||||
if ( is_object( $details ) && $details->spam == 1 )
|
||||
return new WP_Error('blog_suspended', __('Blog Suspended.'));
|
||||
}
|
||||
return $user;
|
||||
}
|
||||
|
||||
function wordpressmu_wp_mail_from( $email ) {
|
||||
if ( strpos( $email, 'wordpress@' ) !== false )
|
||||
$email = get_option( 'admin_email' );
|
||||
|
||||
Reference in New Issue
Block a user