public ActionResult UpdateAvatars(string secret)
 {
     int userCount=0;
     try
     {
         if (secret == "TeamBins")
         {
             IRepositary repo = new Repositary();
             var users = repo.GetUsers().Where(s => String.IsNullOrEmpty(s.Avatar)).ToList();
             foreach (var user in users)
             {
                 user.Avatar = UserService.GetGravatarHash(user.EmailAddress);
                 var result = repo.SaveUser(user);
                 if (result.Status)
                     userCount++;
             }
         }
     }
     catch (Exception ex)
     {
         return Content(ex.Message + ex.InnerException != null ? ex.InnerException.ToString() : "");
     }
     return Content(userCount.ToString() + " user's avatar updated");
 }
 public ProjectsController()
 {
     repo = new Repositary();
     userService = new UserService(repo);
 }
 public DashboardController()
 {
     repo=new Repositary();            
 }
 public ProjectsController(IProjectManager projectManager)
 {
     repo = new Repositary();
     userService = new UserService(repo);
     this.projectManager = projectManager;
 }
 public UsersController()
 {
     repo = new Repositary();
 }