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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user