View difference between Paste ID: dSJVdWQS and id3nj31r
SHOW: | | - or go back to the newest paste.
1
function wpf_load_users() {
2
3
    if(is_admin()) {
4
5
        $users = get_users(array('fields' => array('ID')));
6
        $wpf = WP_Fusion();
7
        $ids = array();
8
9
        foreach($users as $user) {
10
            $contact_id = get_user_meta( $user->ID, 'contact_id', true );
11-
            if(empty($contact_id))
11+
            if(empty($contact_id)) {
12
                $ids[$user->ID] = $wpf->create_user($user->ID);
13
		$wpf->apply_tags(array(9408), $user->ID);
14
	    }
15
        }
16
17
        echo '<pre>';
18
        echo print_r($ids);
19
        echo '</pre>';
20
21
    }
22
23
}
24
25
add_action('init', 'wpf_load_users');