mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 22:50:19 +01:00
MDL-22646 create_context() is internal implementation function, to be used only inside accesslib.php
This commit is contained in:
parent
67485c7f3e
commit
a07600473d
@ -1865,13 +1865,13 @@ function is_safe_capability($capability) {
|
||||
**********************************/
|
||||
|
||||
/**
|
||||
* Create a new context record for use by all roles-related stuff
|
||||
* Context creation - internal implementation.
|
||||
*
|
||||
* Create a new context record for use by all roles-related stuff
|
||||
* assumes that the caller has done the homework.
|
||||
*
|
||||
* @global object
|
||||
* @global object
|
||||
* DO NOT CALL THIS DIRECTLY, instead use {@link get_context_instance}!
|
||||
*
|
||||
* @param int $contextlevel
|
||||
* @param int $instanceid
|
||||
* @param int $strictness
|
||||
|
@ -48,7 +48,7 @@ function user_create_user($user) {
|
||||
$newuserid = $DB->insert_record('user', $user);
|
||||
|
||||
/// create USER context for this user
|
||||
create_context(CONTEXT_USER, $newuserid);
|
||||
get_context_instance(CONTEXT_USER, $newuserid);
|
||||
|
||||
return $newuserid;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user