Passed
Push — master ( 49e85a...5c96d5 )
by Andreas
10:47
created
lib/org/openpsa/user/validator.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.