MDL-17754 $USER object initialisation cleanup
This commit is contained in:
+1
-3
@@ -2229,15 +2229,13 @@ function require_user_key_login($script, $instance=null) {
|
||||
}
|
||||
|
||||
/// emulate normal session
|
||||
$USER = $user;
|
||||
session_set_user($user);
|
||||
|
||||
/// note we are not using normal login
|
||||
if (!defined('USER_KEY_LOGIN')) {
|
||||
define('USER_KEY_LOGIN', true);
|
||||
}
|
||||
|
||||
load_all_capabilities();
|
||||
|
||||
/// return isntance id - it might be empty
|
||||
return $key->instance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user