MDL-58774 auth_oauth2: Only check unexpired accounts for same issuer
authorAndrew Nicols <andrew@nicols.co.uk>
Thu, 11 May 2017 22:44:43 +0000 (06:44 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 12 May 2017 01:44:48 +0000 (09:44 +0800)
commit95dd5e3bd6898f5cf2bfd5a83754473aba99f97c
tree378db61dc1acd8422e5645de033507ea7ff0ef15
parente84fefdb09d0692bb804e33741655523a300e22f
MDL-58774 auth_oauth2: Only check unexpired accounts for same issuer

It shoudl be possible to link multiple OAuth2 sources which have the
same e-mail address to an account.

This patch makes the check for an existing linked account stricter so
that it only checks for linked account records which match the same
issuer, and which do not have expired confirmation tokens.
auth/oauth2/classes/api.php
auth/oauth2/classes/linked_login.php