Dear moodlers, I've tried to give a user the "moodle/user:create" capability. But I'm receiving this error:
Error code: nopermissions
- line 786 of /lib/accesslib.php: required_capability_exception thrown
- line 70 of /user/editadvanced.php: call to require_capability()
I have the user ID, role ID and context ID 1 related in mdl_role_assignments table. Thus the user has this role in the entire site, and no other role.
The mdl_role_capabilities table has the "moodle/user:create" of this role in permission 1 (allow) for contextid 1
However, line 70 of editadvanced.php fails calling "require_capability('moodle/user:create', $systemcontext);"
I verified that $systemcontext has the mdl_context contextid 1 data: course context level 10 (sytem context), instanceid 0 and path '/1'.
I will aprecciate some help to fix it!
Best regards, Leopoldo.