From 5ffe41b6c58db49dc5a64d2ca733c8d4435284f6 Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Fri, 12 May 2017 10:42:40 +0800 Subject: [PATCH] MDL-58899 auth: improve lang strings for confirmation failures in oauth --- auth/oauth2/confirm-account.php | 2 +- auth/oauth2/confirm-linkedlogin.php | 2 +- auth/oauth2/lang/en/auth_oauth2.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/auth/oauth2/confirm-account.php b/auth/oauth2/confirm-account.php index 54e338327f5..03e1b76f719 100644 --- a/auth/oauth2/confirm-account.php +++ b/auth/oauth2/confirm-account.php @@ -85,7 +85,7 @@ if ($confirmed == AUTH_CONFIRM_ALREADY) { echo $OUTPUT->footer(); exit; } else { - print_error('invalidconfirmdata'); + \core\notification::error(get_string('confirmationinvalid', 'auth_oauth2')); } redirect("$CFG->wwwroot/"); diff --git a/auth/oauth2/confirm-linkedlogin.php b/auth/oauth2/confirm-linkedlogin.php index 26182afb069..1d0b78e1eb0 100644 --- a/auth/oauth2/confirm-linkedlogin.php +++ b/auth/oauth2/confirm-linkedlogin.php @@ -72,7 +72,7 @@ if ($confirmed) { echo $OUTPUT->footer(); exit; } else { - print_error('invalidconfirmdata'); + \core\notification::error(get_string('confirmationinvalid', 'auth_oauth2')); } redirect("$CFG->wwwroot/"); diff --git a/auth/oauth2/lang/en/auth_oauth2.php b/auth/oauth2/lang/en/auth_oauth2.php index 4dd4e0bbffe..c8ea3966a22 100644 --- a/auth/oauth2/lang/en/auth_oauth2.php +++ b/auth/oauth2/lang/en/auth_oauth2.php @@ -42,6 +42,7 @@ line at the top of your web browser window. If you need help, please contact the site administrator, {$a->admin}'; $string['confirmaccountemailsubject'] = '{$a}: account confirmation'; +$string['confirmationinvalid'] = 'The confirmation link is either invalid, or has expired. Please start the login process again to generate a new confirmation email.'; $string['confirmationpending'] = 'This account is pending email confirmation.'; $string['confirmlinkedloginemail'] = 'Hi {$a->fullname},