Skip to content

Commit

Permalink
[4.0] Simplify error messages
Browse files Browse the repository at this point in the history
No need for a user to see technical terms when something goes wrong if the message is good enough without

PR for #32263

To test. Follow replication instructions in #32663
  • Loading branch information
brianteeman committed Feb 2, 2021
1 parent cb736cc commit 26e64f4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/com_users/src/Model/ProfileModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ public function save($data)
// Bind the data.
if (!$user->bind($data))
{
$this->setError(Text::sprintf('COM_USERS_PROFILE_BIND_FAILED', $user->getError()));
$this->setError($user->getError());

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_users/src/Model/RegistrationModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public function register($temp)
// Bind the data.
if (!$user->bind($data))
{
$this->setError(Text::sprintf('COM_USERS_REGISTRATION_BIND_FAILED', $user->getError()));
$this->setError($user->getError());

return false;
}
Expand Down
2 changes: 0 additions & 2 deletions language/en-GB/com_users.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ COM_USERS_MAIL_SEND_FAILURE_BODY="An error was encountered when sending the user
COM_USERS_MAIL_SEND_FAILURE_SUBJECT="Error sending email"
COM_USERS_OR="or"
COM_USERS_PROFILE="User Profile"
COM_USERS_PROFILE_BIND_FAILED="Could not bind profile data: %s"
COM_USERS_PROFILE_CORE_LEGEND="Profile"
COM_USERS_PROFILE_DEFAULT_LABEL="Edit Your Profile"
COM_USERS_PROFILE_EMAIL1_LABEL="Email Address"
Expand Down Expand Up @@ -78,7 +77,6 @@ COM_USERS_REGISTRATION_ACTIVATE_SUCCESS="Your Account has been activated. You ca
COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED="An error was encountered while sending activation notification email"
COM_USERS_REGISTRATION_ACTIVATION_SAVE_FAILED="Failed to save activation data: %s"
COM_USERS_REGISTRATION_ADMINACTIVATE_SUCCESS="The user's account has been activated and the user has been notified about it."
COM_USERS_REGISTRATION_BIND_FAILED="Failed to bind registration data: %s"
COM_USERS_REGISTRATION_COMPLETE_ACTIVATE="Your account has been created and an activation link has been sent to the email address you entered. Note that you must activate the account by selecting the activation link when you get the email before you can login."
COM_USERS_REGISTRATION_COMPLETE_VERIFY="Your account has been created and a verification link has been sent to the email address you entered. Note that you must verify the account by selecting the verification link when you get the email and then an administrator will activate your account before you can login."
COM_USERS_REGISTRATION_DEFAULT_LABEL="User Registration"
Expand Down

0 comments on commit 26e64f4

Please sign in to comment.