Skip to content

Commit daf71d2

Browse files
authored
[4.0] Simplify error messages (#32268)
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
1 parent 0f11f38 commit daf71d2

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

components/com_users/src/Model/ProfileModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ public function save($data)
386386
// Bind the data.
387387
if (!$user->bind($data))
388388
{
389-
$this->setError(Text::sprintf('COM_USERS_PROFILE_BIND_FAILED', $user->getError()));
389+
$this->setError($user->getError());
390390

391391
return false;
392392
}

components/com_users/src/Model/RegistrationModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public function register($temp)
481481
// Bind the data.
482482
if (!$user->bind($data))
483483
{
484-
$this->setError(Text::sprintf('COM_USERS_REGISTRATION_BIND_FAILED', $user->getError()));
484+
$this->setError($user->getError());
485485

486486
return false;
487487
}

language/en-GB/com_users.ini

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ COM_USERS_MAIL_SEND_FAILURE_BODY="An error was encountered when sending the user
4343
COM_USERS_MAIL_SEND_FAILURE_SUBJECT="Error sending email"
4444
COM_USERS_OR="or"
4545
COM_USERS_PROFILE="User Profile"
46-
COM_USERS_PROFILE_BIND_FAILED="Could not bind profile data: %s"
4746
COM_USERS_PROFILE_CORE_LEGEND="Profile"
4847
COM_USERS_PROFILE_DEFAULT_LABEL="Edit Your Profile"
4948
COM_USERS_PROFILE_EMAIL1_LABEL="Email Address"
@@ -78,7 +77,6 @@ COM_USERS_REGISTRATION_ACTIVATE_SUCCESS="Your Account has been activated. You ca
7877
COM_USERS_REGISTRATION_ACTIVATION_NOTIFY_SEND_MAIL_FAILED="An error was encountered while sending activation notification email"
7978
COM_USERS_REGISTRATION_ACTIVATION_SAVE_FAILED="Failed to save activation data: %s"
8079
COM_USERS_REGISTRATION_ADMINACTIVATE_SUCCESS="The user's account has been activated and the user has been notified about it."
81-
COM_USERS_REGISTRATION_BIND_FAILED="Failed to bind registration data: %s"
8280
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."
8381
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."
8482
COM_USERS_REGISTRATION_DEFAULT_LABEL="User Registration"

0 commit comments

Comments
 (0)