@@ -77,7 +77,8 @@ discard block |
||
77 | 77 | |
78 | 78 | $passwordEncoder = $this->encoderFactory->getEncoder(AuthenticationMappingEntity::class); |
79 | 79 | |
80 | - if (empty($user) || $user['uid'] <= 1) { // || !$passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) { |
|
80 | + if (empty($user) || $user['uid'] <= 1) { |
|
81 | +// || !$passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) { |
|
81 | 82 | $this->context |
82 | 83 | ->buildViolation($this->trans('Error! Could not login because the user could not be found. Please try again.')) |
83 | 84 | ->addViolation(); |
@@ -92,7 +93,8 @@ discard block |
||
92 | 93 | // new way |
93 | 94 | $passwordEncoder->isPasswordValid($user['pass'], $object['password'], null)) { |
94 | 95 | $validPassword = true; |
95 | - if ($passwordEncoder->needsRehash($user['pass'])) { // check to update hash to newer algo |
|
96 | + if ($passwordEncoder->needsRehash($user['pass'])) { |
|
97 | +// check to update hash to newer algo |
|
96 | 98 | $this->setPassword((int) $user['uid'], $object['password']); |
97 | 99 | } |
98 | 100 | } |
@@ -67,7 +67,7 @@ |
||
67 | 67 | $this->currentUserApi |
68 | 68 | ->method('get') |
69 | 69 | ->with($this->equalTo('uid')) |
70 | - ->willReturnCallback(static function () use ($userId) { |
|
70 | + ->willReturnCallback(static function() use ($userId) { |
|
71 | 71 | return $userId ?? Constant::USER_ID_ANONYMOUS; |
72 | 72 | }); |
73 | 73 | $api = new PermissionApi($this->permRepo, $this->userRepo, $this->currentUserApi, $this->translator); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $this->userRepo |
75 | 75 | ->method('findByUids') |
76 | 76 | ->with($this->anything()) |
77 | - ->willReturnCallback(function (array $uids) { |
|
77 | + ->willReturnCallback(function(array $uids) { |
|
78 | 78 | $groups = new ArrayCollection(); |
79 | 79 | // getGroups returns [gid => $group, gid => $group, ...] |
80 | 80 | if (in_array(self::RANDOM_USER_ID, $uids, true)) { |
@@ -52,12 +52,12 @@ |
||
52 | 52 | |
53 | 53 | if ($parentId > 0) { |
54 | 54 | $qb->andWhere('c.parent = :parentid') |
55 | - ->setParameter('parentid', $parentId); |
|
55 | + ->setParameter('parentid', $parentId); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if (null !== $excludedId && $excludedId > 0) { |
59 | 59 | $qb->andWhere('c.id != :id') |
60 | - ->setParameter('id', $excludedId); |
|
60 | + ->setParameter('id', $excludedId); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | $query = $qb->getQuery(); |
@@ -208,7 +208,7 @@ |
||
208 | 208 | if (typeof exports !== "undefined" && typeof module !== "undefined") { |
209 | 209 | module.exports = components; |
210 | 210 | } |
211 | -EOT; |
|
211 | +eot; |
|
212 | 212 | |
213 | 213 | return $output; |
214 | 214 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | if (empty($importValues)) { |
82 | 82 | return $this->trans('Error! The import file does not have values.'); |
83 | 83 | } |
84 | - $generateErrorList = function ($errors) { |
|
84 | + $generateErrorList = function($errors) { |
|
85 | 85 | $errorList = ''; |
86 | 86 | foreach ($errors as $error) { |
87 | 87 | $errorList .= $error->getMessage() . PHP_EOL; |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | <info>php %command.full_name% 1000 --active=I --verified=2 --regdate='>20200101'</info> |
120 | 120 | |
121 | -EOT |
|
121 | +eot |
|
122 | 122 | ); |
123 | 123 | } |
124 | 124 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | $randTimeStamp = mt_rand($regDate->getTimestamp(), $this->nowUTC->getTimestamp()); |
187 | 187 | |
188 | - return \DateTime::createFromFormat("U", "${randTimeStamp}", $utcTz); |
|
188 | + return \DateTime::createFromFormat("U", "${randtimestamp}", $utcTz); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | private function insertUser(string $uname): void |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | <info>--date</info> <comment>YYYYMMDDHHMMSS</comment> before deleting, filter user collection by date <comment>before</comment> this date. |
87 | 87 | |
88 | -EOT |
|
88 | +eot |
|
89 | 89 | ); |
90 | 90 | } |
91 | 91 |
@@ -99,7 +99,7 @@ |
||
99 | 99 | } |
100 | 100 | if (isset($date)) { |
101 | 101 | $date = \DateTime::createFromFormat('YmdHis', $date, new \DateTimeZone('UTC')); |
102 | - $users = $users->filter(function (UserEntity $user) use ($date) { |
|
102 | + $users = $users->filter(function(UserEntity $user) use ($date) { |
|
103 | 103 | return $user->getRegistrationDate() < $date; |
104 | 104 | }); |
105 | 105 | } |