Created
January 18, 2017 12:25
-
-
Save erikasarti/830311ce6fc9dccd6fce1746f53fe110 to your computer and use it in GitHub Desktop.
Como liberar um username bloqueado no WordPress Multisite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove um nome de usuário reservado no WordPress Multisite | |
function erikasarti_remove_usuario_multisite( $user_login ) { | |
global $wpdb; | |
$success = false; | |
if ( false !== $wpdb->delete( $wpdb->signups, array( 'user_login' => sanitize_text_field( $user_login ) ) ) ) { | |
$success = true; | |
} | |
return $success; | |
} | |
var_dump( erikasarti_remove_usuario_multisite( 'nomedeusuario' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment