diff --git a/server/AyaNova/biz/UserBiz.cs b/server/AyaNova/biz/UserBiz.cs index 7b903ecc..782c85be 100644 --- a/server/AyaNova/biz/UserBiz.cs +++ b/server/AyaNova/biz/UserBiz.cs @@ -57,7 +57,7 @@ namespace AyaNova.Biz { //all users who are customer or head office, active and have a login name set - var ret = await ct.User.AsNoTracking().Where(z => z.Login != null && z.Active == true && ( + var ret = await ct.User.AsNoTracking().Where(z => z.AllowLogin == true && z.Active == true && ( z.UserType == UserType.Customer || z.UserType == UserType.HeadOffice)).LongCountAsync(); return ret; @@ -867,8 +867,8 @@ namespace AyaNova.Biz if (proposedObj.Active != currentObj.Active) AddError(ApiErrorCode.NOT_AUTHORIZED, "Active"); - - if (proposedObj.AllowLogin != currentObj.AllowLogin) + + if (proposedObj.AllowLogin != currentObj.AllowLogin) AddError(ApiErrorCode.NOT_AUTHORIZED, "AllowLogin"); if (proposedObj.Name != currentObj.Name)