diff --git a/common/ASC.Core.Common/Context/Impl/UserManager.cs b/common/ASC.Core.Common/Context/Impl/UserManager.cs index 49db90c36c..ccadfa9b0b 100644 --- a/common/ASC.Core.Common/Context/Impl/UserManager.cs +++ b/common/ASC.Core.Common/Context/Impl/UserManager.cs @@ -175,7 +175,7 @@ public class UserManager users = users.WhereAwait(async u => await this.IsUserAsync(u)); break; } - + return await users.ToArrayAsync(); } @@ -196,7 +196,7 @@ public class UserManager return _userService.GetUsers(Tenant.Id, isDocSpaceAdmin, employeeStatus, includeGroups, excludeGroups, activationStatus, text, sortBy, sortOrderAsc, limit, offset, out total, out count); } - public async Task GetUserNamesAsyncAsync(EmployeeStatus status) + public async Task GetUserNamesAsync(EmployeeStatus status) { return (await GetUsersAsync(status)) .Select(u => u.UserName) @@ -224,7 +224,7 @@ public class UserManager } public async Task IsUserNameExistsAsync(string username) { - return (await GetUserNamesAsyncAsync(EmployeeStatus.All)) + return (await GetUserNamesAsync(EmployeeStatus.All)) .Contains(username, StringComparer.CurrentCultureIgnoreCase); } @@ -278,7 +278,7 @@ public class UserManager public bool UserExists(Guid id) { - return UserExists (GetUsers(id)); + return UserExists(GetUsers(id)); } public bool UserExists(UserInfo user) @@ -392,7 +392,7 @@ public class UserManager var oldUserData = await _userService.GetUserByUserName(await _tenantManager.GetCurrentTenantIdAsync(), u.UserName); var newUser = await UpdateUserInfoAsync(u); - + if (_coreBaseSettings.DisableDocSpace) { await SyncCardDavAsync(u, oldUserData, newUser); diff --git a/web/ASC.Web.Api/Api/PortalController.cs b/web/ASC.Web.Api/Api/PortalController.cs index bc07b2333b..6d0eaf0482 100644 --- a/web/ASC.Web.Api/Api/PortalController.cs +++ b/web/ASC.Web.Api/Api/PortalController.cs @@ -204,7 +204,7 @@ public class PortalController : ControllerBase [HttpGet("userscount")] public async Task GetUsersCountAsync() { - return _coreBaseSettings.Personal ? 1 : (await _userManager.GetUserNamesAsyncAsync(EmployeeStatus.Active)).Length; + return _coreBaseSettings.Personal ? 1 : (await _userManager.GetUserNamesAsync(EmployeeStatus.Active)).Length; } [AllowNotPayment]