Skip to content

Commit

Permalink
MDL-56082 auth: minor tweak to login block idp links
Browse files Browse the repository at this point in the history
No longer set the return url to $SESSION->wantsurl, it doens't make
sense in this context, as the user is probably on the page they want.

Also add a note about this functionality to auth/ugrade.txt
  • Loading branch information
danpoltawski committed Oct 18, 2016
1 parent a477b76 commit 876fc28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions auth/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ information provided here is intended especially for developers.

* New auth hook - pre_user_login_hook() - available, triggered right after the user object is created.
This can be used to modify the user object before any authentication errors are raised.
* The block_login now displays the loginpage_idp_list() links as well as main login page.

=== 3.0 ===

Expand Down
2 changes: 1 addition & 1 deletion blocks/login/block_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function get_content () {
$potentialidps = array();
foreach ($authsequence as $authname) {
$authplugin = get_auth_plugin($authname);
$potentialidps = array_merge($potentialidps, $authplugin->loginpage_idp_list(empty($SESSION->wantsurl) ? '' : $SESSION->wantsurl));
$potentialidps = array_merge($potentialidps, $authplugin->loginpage_idp_list($this->page->url->out(false)));
}

if (!empty($potentialidps)) {
Expand Down

0 comments on commit 876fc28

Please sign in to comment.