I have to perform actions on about 15000 users. I'm using a query to retrieve all uids, but the script crashes when using the user_load_multiple
$uids = db_select('users', 'u')
->fields('u', array('uid'))
->condition('u.status', '1', '=')
->execute()
->fetchCol();
$users = user_load_multiple($uids);
The script is executed every night, in order to find all users for which the field "Contact again on" (field_contact_on) is empty. If it is empty, we put todays date + 1 year.
Does anyone has a suggestion on how to make this more efficient.
Thanks !