mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-58220 oauth2: Fix account linking
The username passed to the confirm account link request is the oauth username, which may be different to the moodle username so can't be used to look up the user record.
This commit is contained in:
parent
b8094f8a18
commit
0eb4c06645
@ -40,8 +40,8 @@ if ($confirmed) {
|
||||
|
||||
// The user has confirmed successfully, let's log them in.
|
||||
|
||||
if (!$user = get_complete_user_data('username', $username)) {
|
||||
print_error('cannotfinduser', '', '', s($username));
|
||||
if (!$user = get_complete_user_data('id', $userid)) {
|
||||
print_error('cannotfinduser', '', '', $userid);
|
||||
}
|
||||
|
||||
if (!$user->suspended) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user