catalyst/moodle-auth_userkey

Customize function loginpage_hook to redirect Requested URL

miguelurtado opened this issue · 1 comments

Suggestion: create settings and change function loginpage_hook to send wantsurl as parameter to return in API login URL.

    public function loginpage_hook() {
        global $SESSION;

        if ($this->should_login_redirect()) {
            $this->redirect($this->config->ssourl . "?wantsurl=" . $SESSION->wantsurl );
        }

        return true;
    }

Thanks for this plugin!

@miguelurtado thanks for the suggestion.
Can you please describe the user case you would need this for better understanding?
And please feel free to submit a proper patch.