public ActionResult GetInvitationsAndNewsCount()
{
int[] countArray = new int[2];
int userId = userProcessor.GetUserByName(User.Identity.Name).Id;
int newsCount = newsRepository.GetNewsCount(userId);
int invitesCount = projectProcessor.GetAllInvitationsToUser(userId).Count();
countArray[0] = newsCount;
countArray[1] = invitesCount;
return Json(countArray);
}