Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpf_load_users() {
- if(is_admin()) {
- $users = get_users(array('fields' => array('ID')));
- $wpf = WP_Fusion();
- $ids = array();
- foreach($users as $user) {
- $contact_id = get_user_meta( $user->ID, 'contact_id', true );
- if(empty($contact_id)) {
- $ids[$user->ID] = $wpf->create_user($user->ID);
- $wpf->apply_tags(array(9408), $user->ID);
- }
- }
- echo '<pre>';
- echo print_r($ids);
- echo '</pre>';
- }
- }
- add_action('init', 'wpf_load_users');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement