@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $result = $this->is_username_available($fields); |
| 25 | 25 | |
| 26 | - if(isset($fields['new_password'])){ |
|
| 26 | + if (isset($fields['new_password'])) { |
|
| 27 | 27 | $result_password = $this->password_check($fields); |
| 28 | 28 | if (is_array($result_password)) { |
| 29 | 29 | $result = (is_array($result)) ? array_merge($result, $result_password) : $result_password; |
@@ -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($fields['password']['password'])){ |
|
| 50 | + if ($fields['password']['switch'] && !$accounthelper->check_password_strength($fields['password']['password'])) { |
|
| 51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -161,10 +161,10 @@ discard block |
||
| 161 | 161 | $user = new midcom_db_person($fields["person"]); |
| 162 | 162 | |
| 163 | 163 | $accounthelper = new org_openpsa_user_accounthelper($user); |
| 164 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
| 164 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
| 165 | 165 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
| 166 | 166 | } |
| 167 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
| 167 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
| 168 | 168 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
| 169 | 169 | } |
| 170 | 170 | if (!empty($result)) { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $result = $this->is_username_available($fields); |
| 25 | 25 | |
| 26 | - if(isset($fields['new_password'])){ |
|
| 26 | + if(isset($fields['new_password'])) { |
|
| 27 | 27 | $result_password = $this->password_check($fields); |
| 28 | 28 | if (is_array($result_password)) { |
| 29 | 29 | $result = (is_array($result)) ? array_merge($result, $result_password) : $result_password; |
@@ -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($fields['password']['password'])){ |
|
| 50 | + if($fields['password']['switch'] && !$accounthelper->check_password_strength($fields['password']['password'])) { |
|
| 51 | 51 | $result = ['password' => midcom::get()->i18n->get_string('password weak', 'org.openpsa.user')]; |
| 52 | 52 | } |
| 53 | 53 | |
@@ -161,10 +161,10 @@ discard block |
||
| 161 | 161 | $user = new midcom_db_person($fields["person"]); |
| 162 | 162 | |
| 163 | 163 | $accounthelper = new org_openpsa_user_accounthelper($user); |
| 164 | - if (!$accounthelper->check_password_reuse($fields['new_password'])){ |
|
| 164 | + if (!$accounthelper->check_password_reuse($fields['new_password'])) { |
|
| 165 | 165 | $result['password'] = midcom::get()->i18n->get_string('password was already used', 'org.openpsa.user'); |
| 166 | 166 | } |
| 167 | - if (!$accounthelper->check_password_strength($fields['new_password'])){ |
|
| 167 | + if (!$accounthelper->check_password_strength($fields['new_password'])) { |
|
| 168 | 168 | $result['password'] = midcom::get()->i18n->get_string('password weak', 'org.openpsa.user'); |
| 169 | 169 | } |
| 170 | 170 | if (!empty($result)) { |