Completed
Pull Request — master (#4135)
by Craig
06:03
created
ZAuthModule/AuthenticationMethod/AbstractNativeAuthenticationMethod.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,8 @@
 block discarded – undo
114 114
 
115 115
         // new way
116 116
         if ($mapping && $passwordEncoder->isPasswordValid($data['pass'])) {
117
-            if ($passwordEncoder->needsRehash($mapping->getPass())) { // check to update hash to newer algo
117
+            if ($passwordEncoder->needsRehash($mapping->getPass())) {
118
+// check to update hash to newer algo
118 119
                 $mapping->setPass($passwordEncoder->encodePassword($data['pass'], null));
119 120
                 $this->mappingRepository->persistAndFlush($mapping);
120 121
             }
Please login to merge, or discard this patch.
src/system/ZAuthModule/Api/PasswordApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -179,8 +179,8 @@
 block discarded – undo
179 179
         if (1 === mb_strlen($saltDelimiter) && false !== mb_strpos($saltedHash, $saltDelimiter)) {
180 180
             [$hashMethod, $saltStr, $correctHash] = explode($saltDelimiter, $saltedHash);
181 181
 
182
-            if (is_numeric($hashMethod) && ((int)$hashMethod === $hashMethod)) {
183
-                $hashMethod = (int)$hashMethod;
182
+            if (is_numeric($hashMethod) && ((int) $hashMethod === $hashMethod)) {
183
+                $hashMethod = (int) $hashMethod;
184 184
             }
185 185
             $hashMethodName = $hashMethodCodeToName[$hashMethod] ?? $hashMethod;
186 186
 
Please login to merge, or discard this patch.
src/system/ZAuthModule/Controller/AccountController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@
 block discarded – undo
307 307
             $data = $form->getData();
308 308
             $code = bin2hex(random_bytes(8));
309 309
             $hashedCode = $encoderFactory->getEncoder(AuthenticationMappingEntity::class)->encodePassword($code, null);
310
-            $currentUserId = (int)$currentUserApi->get('uid');
310
+            $currentUserId = (int) $currentUserApi->get('uid');
311 311
             $userVerificationRepository->setVerificationCode($currentUserId, ZAuthConstant::VERIFYCHGTYPE_EMAIL, $hashedCode, $data['email']);
312 312
             $templateArgs = [
313 313
                 'uname'    => $currentUserApi->get('uname'),
Please login to merge, or discard this patch.