I would like to write a script that updates a particular custom field before a user list is generated. I already have the code to update the field when the users profile is viewed, but now I want to be able to add a cb userlist menu item that will, when selected, show the user a list with the fields updated. This removes the step of having to view the profile first to get the field updated. I'm assuming I need to register for an event trigger, which I did.
Code:
$_PLUGINS->registerFunction( 'onBeforeUsersListBuildQuery', 'updateUserFields');
My next step is to have the function that updates the fields. I need to have a For loop to index through all of the users. I was going to use the user id field to do this, like so:
Code:
for($i = LOWEST_USER_ID; $i <= HIGEST_USER_ID; $i++) {
CODE FOR UPDATE GOES HERE
}
Problem is, I don't know how to get the two variables, lowest and highest user id.
any help?