MDL-22646 create_context() is internal implementation function, to be used only inside accesslib.php
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user