public void JoinClub(int clubID, string clubName, Guid userID, string usersEmail) { ClimberProfileDA cpDA = new ClimberProfileDA(); if (cpDA.GetClimberProfile(usersEmail) == null) { cpDA.CreateDefaultClimberProfile(userID, usersEmail, InsertNewMessageBoard()); } CFLogger.RecordClubJoin(userID, clubName, clubID); new ClubDA().InsertMemeber(clubID, userID); }
/// <summary> /// User stuff /// </summary> public ClimberProfile GetClimberProfile(Guid userID) { ClimberProfileDA da = new ClimberProfileDA(); ClimberProfile profile = da.GetByID(userID); if (profile != null) { return(profile); } else { MembershipUser u = Membership.GetUser(userID); if (u == null) { return(null); } else { return(da.CreateDefaultClimberProfile(userID, User.Name, InsertNewMessageBoard())); } } }