The option list for the field should be sorted by the weight for the corresponding role. This is the way it works for the regular role setting when modifying a user.

The rolereference_potential_references() calls user_roles() in order to build the list, but it doesn't use it in a way which will respect the weight. A minor code change in the foreach loop will change this behavior.

Comments

olofbokedal’s picture

StatusFileSize
new563 bytes
olofbokedal’s picture

Status: Active » Needs review
nwom’s picture

Status: Needs review » Needs work

This appears to need a re-roll. It no longer patches cleanly.

alex liannoy’s picture

Status: Needs work » Needs review
StatusFileSize
new614 bytes

Re-rolled a patch.

alex liannoy’s picture

alex liannoy’s picture

  • Lianik committed aee11d7 on 7.x-1.x
    Issue #2127873 by olofjohansson, Lianik: Sort option list by weight
    
alex liannoy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.