I have 7 roles in my project. I arranged them by weight in admin/people/permissions/roles page Add the sort criteria Global:PHP with code

return $row1->rid;

But users display with no sort on role weight on page.


Look for these solutions:

In Views, how can I show users with one role before all other users?

Role Weights

This way you can get your desired result. Hope this helps.

  • 1
    Thanks. But first issue is not working for me (strange, but have no some elements). About second - installed module, but can't understand where can I use tokens for sorting (yes, i'm new in Drupal) Jun 20 '17 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.