Skip to content

Instantly share code, notes, and snippets.

@horike37
Last active August 29, 2015 14:18
Show Gist options
  • Save horike37/40b8a5d2a9d549a70792 to your computer and use it in GitHub Desktop.
Save horike37/40b8a5d2a9d549a70792 to your computer and use it in GitHub Desktop.
WordPressでユーザのメアドを無効化する
<?php
require_once( 'wp-load.php' ); //スクリプト設置位置によってパスを変える
$users = get_users();
foreach ( $users as $user ) {
wp_update_user( array( 'ID' => $user->ID, 'user_email' => $user-> user_email.'.example') );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment