diff --git a/products/ASC.People/Server/Api/UserController.cs b/products/ASC.People/Server/Api/UserController.cs index 4fba932559..14ea5b7af0 100644 --- a/products/ASC.People/Server/Api/UserController.cs +++ b/products/ASC.People/Server/Api/UserController.cs @@ -207,7 +207,7 @@ public class UserController : PeopleControllerBase if (options != null && !options.IsCorrect) { - throw new InvalidDataException(); + throw new SecurityException(FilesCommonResource.ErrorMessage_InvintationLink); } var user = new UserInfo(); @@ -220,7 +220,7 @@ public class UserController : PeopleControllerBase if (user == Constants.LostUser || user.ActivationStatus != EmployeeActivationStatus.Pending) { - throw new InvalidOperationException(); + throw new SecurityException(FilesCommonResource.ErrorMessage_InvintationLink); } } diff --git a/web/ASC.Web.Core/Users/UserManagerWrapper.cs b/web/ASC.Web.Core/Users/UserManagerWrapper.cs index e73004bde0..4b12d22055 100644 --- a/web/ASC.Web.Core/Users/UserManagerWrapper.cs +++ b/web/ASC.Web.Core/Users/UserManagerWrapper.cs @@ -132,7 +132,7 @@ public sealed class UserManagerWrapper userInfo.WorkFromDate = _tenantUtil.DateTimeNow(); } - if (!_coreBaseSettings.Personal && !fromInviteLink) + if (!_coreBaseSettings.Personal && (!fromInviteLink || updateExising)) { userInfo.ActivationStatus = !afterInvite ? EmployeeActivationStatus.Pending : EmployeeActivationStatus.Activated; }