mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-56765-master' of git://github.com/jleyva/moodle
This commit is contained in:
commit
42fe364f41
1 changed files with 2 additions and 0 deletions
|
@ -111,6 +111,7 @@ class webservice {
|
||||||
|
|
||||||
// setup user session to check capability
|
// setup user session to check capability
|
||||||
\core\session\manager::set_user($user);
|
\core\session\manager::set_user($user);
|
||||||
|
set_login_session_preferences();
|
||||||
|
|
||||||
//assumes that if sid is set then there must be a valid associated session no matter the token type
|
//assumes that if sid is set then there must be a valid associated session no matter the token type
|
||||||
if ($token->sid) {
|
if ($token->sid) {
|
||||||
|
@ -1017,6 +1018,7 @@ abstract class webservice_server implements webservice_server_interface {
|
||||||
// now fake user login, the session is completely empty too
|
// now fake user login, the session is completely empty too
|
||||||
enrol_check_plugins($user);
|
enrol_check_plugins($user);
|
||||||
\core\session\manager::set_user($user);
|
\core\session\manager::set_user($user);
|
||||||
|
set_login_session_preferences();
|
||||||
$this->userid = $user->id;
|
$this->userid = $user->id;
|
||||||
|
|
||||||
if ($this->authmethod != WEBSERVICE_AUTHMETHOD_SESSION_TOKEN && !has_capability("webservice/$this->wsname:use", $this->restricted_context)) {
|
if ($this->authmethod != WEBSERVICE_AUTHMETHOD_SESSION_TOKEN && !has_capability("webservice/$this->wsname:use", $this->restricted_context)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue