diff --git a/core/lexicon/en/user.inc.php b/core/lexicon/en/user.inc.php index 63d2d6828c0..b142626be84 100644 --- a/core/lexicon/en/user.inc.php +++ b/core/lexicon/en/user.inc.php @@ -68,7 +68,7 @@ $_lang['user_blockeduntil_desc'] = 'If set, the user will be blocked until this time.'; $_lang['user_changeddata'] = 'Your data has been changed. Please log in again.'; $_lang['user_class_key_desc'] = 'The MODX Class Key for this user. Do not change this unless you know what you are doing.'; -$_lang['user_created_password_message'] = 'The User has been created. The password is: [[+password]]'; +$_lang['user_created_password_message'] = 'The User [[+username]] has been created.
The password is: [[+password]]'; $_lang['user_confirm_remove'] = 'Are you sure you want to permanently delete this user?'; $_lang['user_country'] = 'Country'; $_lang['user_dob'] = 'Date of birth'; @@ -165,7 +165,7 @@ $_lang['user_male'] = 'Male'; $_lang['user_management_msg'] = 'Here you can choose which user you wish to edit.'; $_lang['user_mobile'] = 'Mobile phone number'; -$_lang['user_password_changed'] = 'Password successfully changed to: [[+password]]'; +$_lang['user_password_changed'] = 'Password successfully changed to: [[+password]]'; $_lang['user_phone'] = 'Phone number'; $_lang['user_photo'] = 'User Photo'; $_lang['user_photo_message'] = 'Enter the image URL for this user or use the insert button to select or upload an image file on the server.'; @@ -186,7 +186,7 @@ $_lang['user_sudo_desc'] = 'If checked, this user will have full access to all the site and will bypass any Access Permissions checks. *DO NOT* check this unless you mean to do so!'; $_lang['user_title'] = 'Create/Edit user'; $_lang['user_other'] = 'Other'; -$_lang['user_updated_password_message'] = 'The User has been updated. The password is: [[+password]]'; +$_lang['user_updated_password_message'] = 'The User [[+username]] has been updated.
The password is: [[+password]]'; $_lang['user_upload_message'] = 'If you wish to stop this user uploading any filetypes in this category, make sure that the \'Use Main Configuration Setting\' checkbox is not ticked and leave the field blank.'; $_lang['user_use_config'] = 'Use System Configuration Setting'; $_lang['user_username_desc'] = 'The unique identifier of this User, and the name by which they will login to the site.'; diff --git a/core/src/Revolution/Processors/Security/User/Create.php b/core/src/Revolution/Processors/Security/User/Create.php index b2bf95835b6..7a5045f81cb 100644 --- a/core/src/Revolution/Processors/Security/User/Create.php +++ b/core/src/Revolution/Processors/Security/User/Create.php @@ -72,9 +72,9 @@ public static function getInstance(modX $modx,$className,$properties = []) { public function initialize() { $this->setDefaultProperties( [ - 'class_key' => $this->classKey, - 'blocked' => false, - 'active' => false, + 'class_key' => $this->classKey, + 'blocked' => false, + 'active' => false, ] ); $this->classKey = $this->getProperty('class_key', modUser::class); @@ -124,10 +124,10 @@ public function setUserGroups() $membership = $this->modx->newObject(modUserGroupMember::class); $membership->fromArray( [ - 'user_group' => $group['usergroup'], - 'role' => $group['role'], - 'member' => $this->object->get('id'), - 'rank' => isset($group['rank']) ? $group['rank'] : $idx + 'user_group' => $group['usergroup'], + 'role' => $group['role'], + 'member' => $this->object->get('id'), + 'rank' => isset($group['rank']) ? $group['rank'] : $idx ] ); if (empty($group['rank'])) { @@ -242,6 +242,7 @@ public function cleanup() { $passwordNotifyMethod = $this->getProperty('passwordnotifymethod', 's'); if (!empty($passwordNotifyMethod) && $passwordNotifyMethod == 's') { return $this->success($this->modx->lexicon('user_created_password_message', [ + 'username' => $this->object->get('username'), 'password' => $this->newPassword, ]), $this->object); } else { diff --git a/core/src/Revolution/Processors/Security/User/Update.php b/core/src/Revolution/Processors/Security/User/Update.php index 02e2cf4e761..8aaad74ec5f 100644 --- a/core/src/Revolution/Processors/Security/User/Update.php +++ b/core/src/Revolution/Processors/Security/User/Update.php @@ -133,11 +133,11 @@ public function checkActiveChange() { if ($this->activeStatusChanged) { $event = $this->newActiveStatus == true ? 'OnBeforeUserActivate' : 'OnBeforeUserDeactivate'; $OnBeforeUserActivate = $this->modx->invokeEvent($event, - [ - 'id' => $this->object->get('id'), - 'user' => &$this->object, - 'mode' => modSystemEvent::MODE_UPD, - ] + [ + 'id' => $this->object->get('id'), + 'user' => &$this->object, + 'mode' => modSystemEvent::MODE_UPD, + ] ); $canChange = $this->processEventResponse($OnBeforeUserActivate); if (!empty($canChange)) { @@ -208,8 +208,8 @@ public function setUserGroups() { $existingGroup = $currentGroups[$existingMembership->get('user_group')]; $existingMembership->fromArray( [ - 'role' => $existingGroup['role'], - 'rank' => isset($existingGroup['rank']) ? $existingGroup['rank'] : 0 + 'role' => $existingGroup['role'], + 'rank' => isset($existingGroup['rank']) ? $existingGroup['rank'] : 0 ] ); $remainingGroupIds[] = $existingMembership->get('user_group'); @@ -233,10 +233,10 @@ public function setUserGroups() { $membership = $this->modx->newObject(modUserGroupMember::class); $membership->fromArray( [ - 'user_group' => $newGroup['usergroup'], - 'role' => $newGroup['role'], - 'member' => $this->object->get('id'), - 'rank' => isset($newGroup['rank']) ? $newGroup['rank'] : $idx + 'user_group' => $newGroup['usergroup'], + 'role' => $newGroup['role'], + 'member' => $this->object->get('id'), + 'rank' => isset($newGroup['rank']) ? $newGroup['rank'] : $idx ] ); if (empty($newGroup['rank'])) { @@ -297,11 +297,11 @@ public function afterSave() { public function fireAfterActiveStatusChange() { $event = $this->newActiveStatus == true ? 'OnUserActivate' : 'OnUserDeactivate'; $this->modx->invokeEvent($event, - [ - 'id' => $this->object->get('id'), - 'user' => &$this->object, - 'mode' => modSystemEvent::MODE_UPD, - ] + [ + 'id' => $this->object->get('id'), + 'user' => &$this->object, + 'mode' => modSystemEvent::MODE_UPD, + ] ); } @@ -321,9 +321,10 @@ public function cleanup() $passwordNotifyMethod = $this->getProperty('passwordnotifymethod'); if (!empty($passwordNotifyMethod) && !empty($this->newPassword) && $passwordNotifyMethod == 's') { return $this->success($this->modx->lexicon('user_updated_password_message', - [ - 'password' => $this->newPassword, - ] + [ + 'username' => $this->object->get('username'), + 'password' => $this->newPassword, + ] ), $this->object); } else { return $this->success('',$this->object);