Skip to content

Commit e130d73

Browse files
committed
Fix reading password requirements in ResetPassword
1 parent bd750b1 commit e130d73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Controllers/User/ResetPassword.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ protected function doPasswordReset(): mixed
9191
$req = Config::get('bnetdocs.user_register_requirements') ?? [];
9292
$pwlen = strlen($this->model->pw1);
9393

94-
if (is_numeric($req->password_length_max) && $pwlen > $req->password_length_max)
94+
if (is_numeric($req['password_length_max']) && $pwlen > $req['password_length_max'])
9595
return ResetPasswordModel::ERROR_PASSWORD_TOO_LONG;
9696

97-
if (is_numeric($req->password_length_min) && $pwlen < $req->password_length_min)
97+
if (is_numeric($req['password_length_min']) && $pwlen < $req['password_length_min'])
9898
return ResetPasswordModel::ERROR_PASSWORD_TOO_SHORT;
9999

100-
if (!$req->password_allow_email && stripos($this->model->pw1, $this->model->user->getEmail()))
100+
if (!$req['password_allow_email'] && stripos($this->model->pw1, $this->model->user->getEmail()))
101101
return ResetPasswordModel::ERROR_PASSWORD_CONTAINS_EMAIL;
102102

103-
if (!$req->password_allow_username && stripos($this->model->pw1, $this->model->user->getUsername()))
103+
if (!$req['password_allow_username'] && stripos($this->model->pw1, $this->model->user->getUsername()))
104104
return ResetPasswordModel::ERROR_PASSWORD_CONTAINS_USERNAME;
105105

106106
if ($this->model->user->isDisabled()) return ResetPasswordModel::ERROR_USER_DISABLED;

0 commit comments

Comments
 (0)