Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meta_query_args = array(
- array(
- 'key' => 'access_code',
- 'value' => 'abc',
- 'compare' => '='
- )
- );
- $args = array(
- 'meta_query' => $meta_query_args
- );
- $users = get_users( $args );
- // User Loop
- foreach ( $users as $user ) {
- update_user_meta( $user->ID, 'association', 'XYZ Corporation');
- }
Add Comment
Please, Sign In to add comment