user_save function needs rid to be set as key of an array but array($rid) puts rid into value and not key.
I created an one line patch that fix this.

CommentFileSizeAuthor
drupal_test_case.patch.txt658 bytesRok Žlender

Comments

Thomas Ilsche’s picture

I commited a slightly modified patch.

$ua['roles'] = array($rid=>$rid);

just to be sure.

webchick’s picture

Status: Needs review » Closed (fixed)

This looks like it's been fixed.