Completed
Push — master ( 294057...9019c5 )
by
unknown
29:23
created
apps/settings/lib/Controller/UsersController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		];
161 161
 
162 162
 		if (!$isLDAPUsed && $this->appManager->isEnabledForUser('user_ldap')) {
163
-			$isLDAPUsed = (bool)array_reduce($this->userManager->getBackends(), function ($ldapFound, $backend) {
163
+			$isLDAPUsed = (bool) array_reduce($this->userManager->getBackends(), function($ldapFound, $backend) {
164 164
 				return $ldapFound || $backend instanceof User_Proxy;
165 165
 			});
166 166
 		}
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
 		if (!$isLDAPUsed) {
172 172
 			if ($isAdmin || $isDelegatedAdmin) {
173 173
 				$disabledUsers = $this->userManager->countDisabledUsers();
174
-				$userCount = array_reduce($this->userManager->countUsers(), function ($v, $w) {
175
-					return $v + (int)$w;
174
+				$userCount = array_reduce($this->userManager->countUsers(), function($v, $w) {
175
+					return $v + (int) $w;
176 176
 				}, 0);
177 177
 			} else {
178 178
 				// User is subadmin !
179
-				[$userCount,$disabledUsers] = $this->userManager->countUsersAndDisabledUsersOfGroups($groupsInfo->getGroups(), self::COUNT_LIMIT_FOR_SUBADMINS);
179
+				[$userCount, $disabledUsers] = $this->userManager->countUsersAndDisabledUsersOfGroups($groupsInfo->getGroups(), self::COUNT_LIMIT_FOR_SUBADMINS);
180 180
 			}
181 181
 
182 182
 			if ($disabledUsers > 0) {
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 		$serverData['isDelegatedAdmin'] = $isDelegatedAdmin;
234 234
 		$serverData['sortGroups'] = $forceSortGroupByName
235 235
 			? MetaData::SORT_GROUPNAME
236
-			: (int)$this->appConfig->getValueString('core', 'group.sortBy', (string)MetaData::SORT_USERCOUNT);
236
+			: (int) $this->appConfig->getValueString('core', 'group.sortBy', (string) MetaData::SORT_USERCOUNT);
237 237
 		$serverData['forceSortGroupByName'] = $forceSortGroupByName;
238 238
 		$serverData['quotaPreset'] = $quotaPreset;
239 239
 		$serverData['allowUnlimitedQuota'] = $allowUnlimitedQuota;
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 				],
474 474
 				Http::STATUS_OK
475 475
 			);
476
-		} catch (ForbiddenException|InvalidArgumentException|PropertyDoesNotExistException $e) {
476
+		} catch (ForbiddenException | InvalidArgumentException | PropertyDoesNotExistException $e) {
477 477
 			return new DataResponse([
478 478
 				'status' => 'error',
479 479
 				'data' => [
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 		}
501 501
 
502 502
 		$oldEmailAddress = $userAccount->getUser()->getSystemEMailAddress();
503
-		$oldEmailAddress = strtolower((string)$oldEmailAddress);
503
+		$oldEmailAddress = strtolower((string) $oldEmailAddress);
504 504
 		if ($oldEmailAddress !== strtolower($userAccount->getProperty(IAccountManager::PROPERTY_EMAIL)->getValue())) {
505 505
 			// this is the only permission a backend provides and is also used
506 506
 			// for the permission of setting a email address
@@ -543,11 +543,11 @@  discard block
 block discarded – undo
543 543
 
544 544
 		$userAccount = $this->accountManager->getAccount($user);
545 545
 		$cloudId = $user->getCloudId();
546
-		$message = 'Use my Federated Cloud ID to share with me: ' . $cloudId;
546
+		$message = 'Use my Federated Cloud ID to share with me: '.$cloudId;
547 547
 		$signature = $this->signMessage($user, $message);
548 548
 
549
-		$code = $message . ' ' . $signature;
550
-		$codeMd5 = $message . ' ' . md5($signature);
549
+		$code = $message.' '.$signature;
550
+		$codeMd5 = $message.' '.md5($signature);
551 551
 
552 552
 		switch ($account) {
553 553
 			case 'verify-twitter':
Please login to merge, or discard this patch.