Skip to content

Commit

Permalink
MDL-80332 core: Coding style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Mar 26, 2024
1 parent c9030a8 commit bb80e4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions admin/tool/mfa/classes/hook/after_user_passed_mfa.php
Expand Up @@ -22,12 +22,13 @@
/**
* Allow plugins to callback as soon possible after user has passed MFA.
*
* @package core
* @package tool_mfa
* @copyright 2024 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class after_user_passed_mfa implements described_hook,
\Psr\EventDispatcher\StoppableEventInterface {
class after_user_passed_mfa implements
described_hook,
\Psr\EventDispatcher\StoppableEventInterface {
use stoppable_trait;

/**
Expand Down
Expand Up @@ -24,7 +24,6 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class after_complete_login {

/**
* Callback to recover $SESSION->wantsurl.
*
Expand All @@ -36,7 +35,6 @@ public static function callback(\core\hook\user\after_complete_login $hook): voi
// Check if the user is doing a mobile app launch, if that's the case, ensure $SESSION->wantsurl is correctly set.
if (!NO_MOODLE_COOKIES && !empty($_COOKIE['tool_mobile_launch'])) {
if (empty($SESSION->wantsurl) || strpos($SESSION->wantsurl, '/tool/mobile/launch.php') === false) {

$params = json_decode($_COOKIE['tool_mobile_launch'], true);
$SESSION->wantsurl = (new \moodle_url("/$CFG->admin/tool/mobile/launch.php", $params))->out(false);
}
Expand Down
5 changes: 3 additions & 2 deletions lib/classes/hook/user/after_complete_login.php
Expand Up @@ -26,8 +26,9 @@
* @copyright 2024 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class after_complete_login implements described_hook,
\Psr\EventDispatcher\StoppableEventInterface {
class after_complete_login implements
described_hook,
\Psr\EventDispatcher\StoppableEventInterface {
use stoppable_trait;

/**
Expand Down

0 comments on commit bb80e4f

Please sign in to comment.