Hello,
I've noticed that user selectable roles are broken again. The reason for that is because array_unshift doens't work like expected with numerical keys. See
array_unshift() prepends passed elements to the front of the array. Note that the list of elements is prepended as a whole, so that the prepended elements stay in the same order. All numerical array keys will be modified to start counting from zero while literal keys won't be touched.
from here: http://php.net/manual/en/function.array-unshift.php
So for the case when "none" is added to the array, the rids are lost. The fix would be to replace array_unshift with something like this:
$roles = array(0 => t('None')) + $roles;
Comments
Comment #1
mike.davis commentedHi Stefan,
Thanks for the patch. I'll have a look at this issue and your patch and see if we can get this resolved ready for another release.
Thanks
Mike
Comment #3
mike.davis commentedThanks Stefan, this has been fixed now and a new beta release.
Comment #4
mike.davis commented