Skip to content

Instantly share code, notes, and snippets.

View ideag's full-sized avatar

Arūnas Liuiza ideag

View GitHub Profile
@mattboon
mattboon / gist:4045215
Created November 9, 2012 11:21
Update WP user_login via SQL
<?php
// Force update our username (user_login)
global $wpdb;
$tablename = $wpdb->prefix . "users";
// method 1
//$sql = $wpdb->prepare("UPDATE %s SET user_login=%s WHERE ID=%d", $tablename, $user_email, $user_id);
//$wpdb->query($sql);