How can I quickly re-save all users on my site? Very similar to this question except I need to save users, not nodes.

Use case: I added a field (single boolean) to a feature so that the field is added to user profiles.  I then pushed the feature to my staging server.  However, existing user accounts do not have the default field value for this field assigned.  Re-saving each account fixes the problem, but there are 1000 users.

How can I quickly re-save all users on my site?
You can use the "Execute arbitrary PHP script" bulk operation in VBO and when you run it enter:

user_save($entity);


You could also run this PHP (you can do so by enabling the devel module and going to devel/php on your site):

set_time_limit(0);
$uids = db_query('SELECT uid FROM {users} WHERE uid != 0')-&gt;fetchCol();
$users = user_load_multiple($uids);
foreach ($users as $user) {
  user_save($user);
}


If you don't have many users you shouldn't need the time limit line.

Also, Clive mentions that field_attach_update is faster. To use that replace the user_save line with field_attach_update('user', $user)