Forked from erikasarti/liberar-username-wordpress-multisite
Created
May 24, 2018 19:38
-
-
Save olucasmac/fd4ade152cfadd497fe56e86c1269a39 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