diff --git a/login/signup_form.php b/login/signup_form.php index 20176bae521..85e31cd3f95 100644 --- a/login/signup_form.php +++ b/login/signup_form.php @@ -79,7 +79,7 @@ class login_signup_form extends moodleform { //check if user exists in external db //TODO: maybe we should check all enabled plugins instead - if ($authplugin->user_exists($user->username)) { + if ($authplugin->user_exists($data['username'])) { $errors['username'] = get_string('usernameexists'); }