Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Confused with database and models

13»

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 ?

  • peregrineperegrine MVP
    edited December 2013

    @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).

Sign In or Register to comment.