Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

[Solved] user list plugin : random users not working

im using user list plugin. random user not working. always displaying same users. how can i fix

Best Answer

  • jspautschjspautsch Themester ✭✭
    Answer ✓

    Looks like he forgot to include the OrderBy. Open up class.userlistmodule.php and find the following statement...

    $this->Users = $SQL
            ->Select($Select)
            ->From($From)
            ->Join('UserRole r','u.UserID = r.UserID')
            ->Where($Where)
            ->Get();

    ...then add a line to make it look like this:

    $this->Users = $SQL
            ->Select($Select)
            ->From($From)
            ->Join('UserRole r','u.UserID = r.UserID')
            ->Where($Where)
            ->OrderBy($Order)
            ->Get();

    See if that works!

    Pamela

Answers

Sign In or Register to comment.