Skip to content

Commit

Permalink
Fixed: If password field is blank when saving a user
Browse files Browse the repository at this point in the history
  • Loading branch information
bymayo committed Jul 11, 2024
1 parent c52a1fd commit fc581cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Porter Changelog

## 5.0.2 - 2024-07-11
### Fixed
- If password field is blank when saving a user in the CP, skip password validation

## 5.0.1 - 2024-05-30
### Changed
- Icon to a new shiny (literally) icon
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bymayo/porter",
"description": "A toolkit with lots of helpers for users and accounts",
"type": "craft-plugin",
"version": "5.0.1",
"version": "5.0.2",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion src/Porter.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function (ModelEvent $event) {

}

if ($this->settings->passwordForcePolicy && ($user->newPassword || strlen($user->newPassword) >= 0))
if ($this->settings->passwordForcePolicy && ($user->newPassword || strlen($user->newPassword) > 0))
{

$errors = $this->emailPassword->checkPasswordPolicy($user->newPassword);
Expand Down

0 comments on commit fc581cc

Please sign in to comment.