@@ -58,10 +58,10 @@ |
||
58 | 58 | /** @scrutinizer ignore-call */ |
59 | 59 | $this->loggedUser = $this->authenticator->getDataOnly($this->nameFromSess()); |
60 | 60 | } else { |
61 | - $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : '' ; |
|
62 | - $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name ; |
|
63 | - $pass = $credentials->offsetExists(static::INPUT_PASS) ? strval($credentials->offsetGet(static::INPUT_PASS)) : '' ; |
|
64 | - $pass = $credentials->offsetExists(static::INPUT_PASS2) ? strval($credentials->offsetGet(static::INPUT_PASS2)) : $pass ; |
|
61 | + $name = $credentials->offsetExists(static::INPUT_NAME) ? strval($credentials->offsetGet(static::INPUT_NAME)) : ''; |
|
62 | + $name = $credentials->offsetExists(static::INPUT_NAME2) ? strval($credentials->offsetGet(static::INPUT_NAME2)) : $name; |
|
63 | + $pass = $credentials->offsetExists(static::INPUT_PASS) ? strval($credentials->offsetGet(static::INPUT_PASS)) : ''; |
|
64 | + $pass = $credentials->offsetExists(static::INPUT_PASS2) ? strval($credentials->offsetGet(static::INPUT_PASS2)) : $pass; |
|
65 | 65 | if (!empty($name) && !empty($pass)) { |
66 | 66 | /** @scrutinizer ignore-call */ |
67 | 67 | $this->loggedUser = $this->authenticator->authenticate($name, ['password' => $pass]); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | 'password' => $params['password'] ?: '' |
37 | 37 | ])) |
38 | 38 | ? $this->getDataOnly($userName) |
39 | - : null ; |
|
39 | + : null; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | public function getDataOnly(string $userName): ?IUser |
@@ -44,6 +44,6 @@ discard block |
||
44 | 44 | $record = new Ldap\LdapRecord(); |
45 | 45 | $record->name = $userName; |
46 | 46 | $record->load(); |
47 | - return (empty($record->getAuthId())) ? null : $record ; |
|
47 | + return (empty($record->getAuthId())) ? null : $record; |
|
48 | 48 | } |
49 | 49 | } |
@@ -132,8 +132,8 @@ |
||
132 | 132 | foreach ($groupLines as &$line) { |
133 | 133 | if ($line[IAccessGroups::GRP_ID] == $group->getGroupId()) { |
134 | 134 | // REFILL |
135 | - $line[IAccessGroups::GRP_NAME] = !empty($groupName) ? $groupName : $line[IAccessGroups::GRP_NAME] ; |
|
136 | - $line[IAccessGroups::GRP_DESC] = !empty($groupDesc) ? $groupDesc : $line[IAccessGroups::GRP_DESC] ; |
|
135 | + $line[IAccessGroups::GRP_NAME] = !empty($groupName) ? $groupName : $line[IAccessGroups::GRP_NAME]; |
|
136 | + $line[IAccessGroups::GRP_DESC] = !empty($groupDesc) ? $groupDesc : $line[IAccessGroups::GRP_DESC]; |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | static::PW_ID => $uid, |
145 | 145 | static::PW_NAME => $userName, |
146 | 146 | static::PW_PASS => $this->mode->hash($password), |
147 | - static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getClass() , |
|
148 | - static::PW_CLASS => empty($user->getClass()) ? Interfaces\IAccessClasses::CLASS_USER : $user->getClass() , |
|
147 | + static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getClass(), |
|
148 | + static::PW_CLASS => empty($user->getClass()) ? Interfaces\IAccessClasses::CLASS_USER : $user->getClass(), |
|
149 | 149 | static::PW_DISPLAY => empty($displayName) ? $userName : $displayName, |
150 | 150 | static::PW_DIR => $directory, |
151 | 151 | static::PW_FEED => '', |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | foreach ($passwordLines as &$line) { |
198 | 198 | if ($line[static::PW_NAME] == $userName) { |
199 | 199 | // REFILL |
200 | - $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP] ; |
|
201 | - $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS] ; |
|
202 | - $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY] ; |
|
203 | - $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR] ; |
|
200 | + $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP]; |
|
201 | + $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS]; |
|
202 | + $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY]; |
|
203 | + $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR]; |
|
204 | 204 | } |
205 | 205 | } |
206 | 206 |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | $newUserPass = [ |
242 | 242 | static::PW_NAME => $userName, |
243 | 243 | static::PW_ID => $uid, |
244 | - static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getGroup() , |
|
245 | - static::PW_CLASS => empty($user->getClass()) ? Interfaces\IAccessClasses::CLASS_USER : $user->getClass() , |
|
244 | + static::PW_GROUP => empty($user->getGroup()) ? $uid : $user->getGroup(), |
|
245 | + static::PW_CLASS => empty($user->getClass()) ? Interfaces\IAccessClasses::CLASS_USER : $user->getClass(), |
|
246 | 246 | static::PW_DISPLAY => empty($displayName) ? $userName : $displayName, |
247 | 247 | static::PW_DIR => $directory, |
248 | 248 | static::PW_FEED => '', |
@@ -332,10 +332,10 @@ discard block |
||
332 | 332 | $oldName = $line[static::PW_NAME]; |
333 | 333 | $line[static::PW_NAME] = $userName; |
334 | 334 | } |
335 | - $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP] ; |
|
336 | - $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS] ; |
|
337 | - $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY] ; |
|
338 | - $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR] ; |
|
335 | + $line[static::PW_GROUP] = !empty($user->getGroup()) ? $user->getGroup() : $line[static::PW_GROUP]; |
|
336 | + $line[static::PW_CLASS] = !empty($user->getClass()) ? $user->getClass() : $line[static::PW_CLASS]; |
|
337 | + $line[static::PW_DISPLAY] = !empty($displayName) ? $displayName : $line[static::PW_DISPLAY]; |
|
338 | + $line[static::PW_DIR] = !empty($directory) ? $directory : $line[static::PW_DIR]; |
|
339 | 339 | } |
340 | 340 | } |
341 | 341 |