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?
This way you can get your desired result. Hope this helps.