Plugin Side Effect - Can't Login as Other Users

Re: Plugin Side Effect - Can't Login as Other Users

by Kaesha Thomas -
Number of replies: 0

Thank you for pointing it out--that was the issue! Went to the plugin's page and found the solution written down at the bottom:

"If you add the hook for email registration to your theme in 2.6+, the loginas functionality will break. I added the following to the hook function in auth.php* to ignore admins logged in as students.

if (\core\session\manager::is_loggedinas()) {
$SESSION->mcautoenrolled = TRUE;
return true;
}"

*auth.php refers to the /auth/mcae/auth.php folder for the plugin.


Thanks all! You were a big help.