Skip to content

Commit

Permalink
Replaced string check with simpler logic. Passes unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kschroeder committed Jun 18, 2015
1 parent 142c88a commit bc1b1e9
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,7 @@ public function beforeSave($object)
);
}

if ($this->string->substr(
$password,
0,
1
) == ' ' || $this->string->substr(
$password,
$length - 1,
1
) == ' '
) {
if (trim($password) != $password) {
throw new LocalizedException(__('The password can not begin or end with a space.'));
}

Expand Down

0 comments on commit bc1b1e9

Please sign in to comment.