@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $result = $this->is_username_available($fields); |
48 | 48 | |
49 | 49 | $accounthelper = new org_openpsa_user_accounthelper(); |
50 | - if ($fields['password']['switch'] && !$accounthelper->check_password_strength((string) $fields['password']['password'])){ |
|
50 | + if ($fields['password']['switch'] && !$accounthelper->check_password_strength((string) $fields['password']['password'])) { |
|
51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
52 | 52 | } |
53 | 53 | |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | $user = new midcom_db_person($fields["person"]); |
153 | 153 | |
154 | 154 | $accounthelper = new org_openpsa_user_accounthelper($user); |
155 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
155 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
156 | 156 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
157 | 157 | } |
158 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
158 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
159 | 159 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
160 | 160 | } |
161 | 161 | return $result ?: true; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $result = $this->is_username_available($fields); |
48 | 48 | |
49 | 49 | $accounthelper = new org_openpsa_user_accounthelper(); |
50 | - if ($fields['password']['switch'] && !$accounthelper->check_password_strength((string) $fields['password']['password'])){ |
|
50 | + if ($fields['password']['switch'] && !$accounthelper->check_password_strength((string) $fields['password']['password'])) { |
|
51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
52 | 52 | } |
53 | 53 | |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | $user = new midcom_db_person($fields["person"]); |
153 | 153 | |
154 | 154 | $accounthelper = new org_openpsa_user_accounthelper($user); |
155 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
155 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
156 | 156 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
157 | 157 | } |
158 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
158 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
159 | 159 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
160 | 160 | } |
161 | 161 | return $result ?: true; |