Fix from Codacy

This commit is contained in:
Valentin Popov 2017-10-17 12:15:39 +04:00
parent 31cf02f67b
commit 40e3e4f8a7

View File

@ -152,12 +152,12 @@ class auth_plugin_link extends auth_plugin_base {
public function redirect_user() {
global $CFG, $SESSION;
$redirect = $CFG->wwwroot;
if (isset($SESSION->wantsurl)) {
$redirect = $SESSION->wantsurl;
} else if (isset($_GET['wantsurl'])) {
$redirect = htmlspecialchars($_GET['wantsurl']);
} else {
$redirect = $CFG->wwwroot;
}
redirect($redirect);