public string addSubForum(string forumName, string subForumName, List <Tuple <string, string, int> > moderators, string requestingUser) { if (moderators == null) { return(Constants.INVALID_INPUT); } List <string> input = new List <string>() { forumName, subForumName }; foreach (Tuple <string, string, int> t in moderators) { input.Add(t.Item1); //input.Add(t.Item2); } if (Constants.isValidInput(input)) { lock (o) { int maxNumOfModerators = _fm.getForumMaxModerators(forumName); if (maxNumOfModerators == -1) { return(Constants.forumDoesntExist(forumName)); } if (moderators.Count > maxNumOfModerators) { return(Constants.ILLEGAL_ACTION); } int seniority = _fm.getForumSeniorityLimit(forumName); string res = _um.addSubForum(forumName, subForumName, moderators, requestingUser, seniority); if (res.Equals(Constants.SUCCESS)) { return(_fm.addSubForum(forumName, subForumName)); } return(res); } } return(Constants.INVALID_INPUT); }