Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php b/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php
- index 6beabc5..5d891ac 100755
- --- a/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php
- +++ b/wp-content/plugins/wordpress-mu-domain-mapping/domain_mapping.php
- @@ -752,7 +752,11 @@ function remote_login_js() {
- if ( !is_user_logged_in() )
- exit;
- $key = md5( time() . mt_rand() );
- - $wpdb->query( $wpdb->prepare( "INSERT INTO {$wpdb->dmtablelogins} ( `id`, `user_id`, `blog_id`, `t` ) VALUES( %s, %d, %d, NOW() )", $key, $current_user->ID, $_GET[ 'blogid' ] ) );
- + $result = $wpdb->insert( $wpdb->dmtablelogins, array( 'id' => $key, 'user_id' => $current_user->ID, 'blog_id' => $_GET[ 'blogid' ] ), array( '%s', '%d', '%d' ) );
- + if ( false === $result ) {
- + echo "// WP MU Domain Mapping Error: Cannot write login keys to database \n";
- + exit;
- + }
- $url = add_query_arg( array( 'action' => 'login', 'dm' => $hash, 'k' => $key, 't' => mt_rand() ), $_GET[ 'back' ] );
- echo "window.location = '$url'";
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement