Hi, I am getting this warning when trying to create users (mysite.com/admin/user-creator-create):

warning: Invalid argument supplied for foreach() in /mysite.com/modules/user_creator/user_creator.module on line 193.

Do you know what could be causing this?

CommentFileSizeAuthor
#5 user_creator_for_loop.patch542 byteselliotttt

Comments

eforth’s picture

+1

elliotttt’s picture

Assigned: Unassigned » elliotttt

Ah, yes I think I do know what might be causing this. Will post a patch today or tomorrow.

kaod’s picture

Visit:

/admin/settings/user_creator/settings

and choose which users can create what. Also remember to visit "permissions" and choose which roles have permission to create limited users.

dyesdyes’s picture

i'm reopening this issue.

i went to /admin/settings/user_creator/settings and i granted permissions but the message is still there.

Someone has an idea ?

line 192-197

$perms = array(variable_get('user_creator_roles_'. $machine_role, NULL));
foreach($perms[0] as $perm) {
if ($perm != 0) {
$roles[$perm] = $available_roles[$perm];
}
}

elliotttt’s picture

Status: Active » Needs review
StatusFileSize
new542 bytes

someone mind testing this patch? I think this should fix it.

dyesdyes’s picture

Worked for me.

Thanks