Skip to content

Commit

Permalink
Fix display of notification when User password is created/updated (#1…
Browse files Browse the repository at this point in the history
…6668)

### What does it do?
Corrects conditionals in New Password area of the User form so the new
password dialog notification only shows when the password is
MODX-generated.

### Why is it needed?
See related issue.

### How to test
Create and update users using each password method to verify the dialog
only shows when appropriate.

### Related issue(s)/PR(s)
Resolves #16666
  • Loading branch information
smg6511 authored Jan 21, 2025
1 parent 5f9b5a7 commit 37e1833
Show file tree
Hide file tree
Showing 2 changed files with 660 additions and 603 deletions.
4 changes: 2 additions & 2 deletions core/src/Revolution/Processors/Security/User/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ public function sendNotificationEmail() {
* @return array|string
*/
public function cleanup() {
$passwordNotifyMethod = $this->getProperty('passwordnotifymethod', 's');
if (!empty($passwordNotifyMethod) && $passwordNotifyMethod == 's') {
$passwordNotifyMethod = $this->getProperty('passwordnotifymethod');
if (!empty($passwordNotifyMethod) && $passwordNotifyMethod === 's') {
return $this->success($this->modx->lexicon('user_created_password_message', [
'username' => $this->object->get('username'),
'password' => $this->newPassword,
Expand Down
Loading

0 comments on commit 37e1833

Please sign in to comment.