Code Duplication    Length = 7-7 lines in 2 locations

src/wp-admin/network/site-users.php 1 location

@@ 159-165 (lines=7) @@
156
					$user_id = (int) $user_id;
157
158
					// If the user doesn't already belong to the blog, bail.
159
					if ( ! is_user_member_of_blog( $user_id ) ) {
160
						wp_die(
161
							'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
162
							'<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
163
							403
164
						);
165
					}
166
167
					$user = get_userdata( $user_id );
168
					$user->set_role( $role );

src/wp-admin/users.php 1 location

@@ 131-137 (lines=7) @@
128
		}
129
130
		// If the user doesn't already belong to the blog, bail.
131
		if ( is_multisite() && !is_user_member_of_blog( $id ) ) {
132
			wp_die(
133
				'<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
134
				'<p>' . __( 'One of the selected users is not a member of this site.' ) . '</p>',
135
				403
136
			);
137
		}
138
139
		$user = get_userdata( $id );
140
		$user->set_role( $role );