@R_J : Why should I avoid cronjobs? Also, is there any way to iterate over all Users using UserModel? should I use GetID from 1 until I get null or should I just use Gdn::SQL to select all users then iterate over the rows ?
@Aviram said: @R_J : Why should I avoid cronjobs? r_j already said: Setting up an additional cron job will make it hard for others to use your plugin.
@Aviram said: @R_J : Why should I avoid cronjobs?
r_j already said: Setting up an additional cron job will make it hard for others to use your plugin.
If you can do it within your plugin it avoids extra complexity. But if it is a time consuming process cron might be better.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I see no function to get all users directly. You can only do a select userid from gdn_user and use UserModel->GetIDs($ResultArray).
select userid from gdn_user
UserModel->GetIDs($ResultArray)
Comments
@R_J :
Why should I avoid cronjobs?
Also, is there any way to iterate over all Users using UserModel? should I use GetID from 1 until I get null or should I just use Gdn::SQL to select all users then iterate over the rows ?
If you can do it within your plugin it avoids extra complexity. But if it is a time consuming process cron might be better.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I see no function to get all users directly. You can only do a
select userid from gdn_user
and useUserModel->GetIDs($ResultArray)
.