changing the "loginas" function's behavior

changing the "loginas" function's behavior

by Patrick Scott -
Number of replies: 1

I want to change the functionality of the "login as" feature in Moodle.

the function is at /lib/classes/session/manager.php in line 921 (or so)

the function is static function called "loginas" under the "manager" class in the "\core\session\manager".

the function is called in /course/loginas.php as so:

\core\session\manager::loginas($userid, $context);

and that is the place in which I want "loginas" function to behave differently.

 

even if I inherit the manager class and create my own static loginas function under the "local" folder - I can't see how that would help me if in loginas.php the parent function is called.

and I really really don't want to make any core changes (anything under the "course" or "lib" folders are obviously core)

is there a way to avoid core changes in this case?

I have Moodle3.8.1 installed.


Average of ratings: -
In reply to Patrick Scott

Re: changing the "loginas" function's behavior

by Justin Reeve -
Did you ever figure out a solution to this problem?