private void createCommunityUser() { //pulling this out of membership manager for now until we find the best place. //It had been in AddMember berfore but there is no screen name available when we Add a member. //create Telligent user: var tMember = TelligentService.GetPosesMember(this.CurrentMember.ScreenName); //if we have a screen name and it doesn't exist in Telligent yet... if (!string.IsNullOrEmpty(this.CurrentMember.ScreenName) && !string.IsNullOrEmpty(this.CurrentUser.Email) && tMember == null) { try { bool communitySuccess = CommunityHelper.CreateUser(this.CurrentMember.ScreenName, this.CurrentUser.Email); //bool communitySuccess = CommunityHelper.CreateUser(CurrentMember.ScreenName, CurrentUser.Email); if (communitySuccess == false) { // ¡Ay, caramba! // give them a nice "I'm sorry" please try again later message. //uxErrorMessage.Text = "<font color=red> </ font> "; //uxErrorMessage.Visible = true; //err = true; //dont progress. stop and display an error. throw new Exception("I'm sorry, the Community User failed to be created properly."); } } catch (Exception ex) { //bg: we need a generic procedure for handling errors so that we can display important data properly without being gross //uxErrorMessage.Text = "<font color=red>I'm sorry, an error has occured while trying to create the Community User. <hr> " + // "Message: " + ex.Message + Environment.NewLine + // "Source: " + ex.Source + Environment.NewLine + "<hr>" + // "Stack Trace: " + ex.StackTrace + Environment.NewLine + // "Inner Message: " + ex.InnerException.Message + Environment.NewLine + // "Inner Source: " + ex.InnerException.Source + Environment.NewLine + // "Inner Stack Trace: " + ex.InnerException.StackTrace + // "</font>"; //uxErrorMessage.Visible = true; //err = true; throw ex; } } //if (!string.IsNullOrEmpty(CurrentMember.ScreenName)) //optional to the user //{ // if (mode != Constants.QueryStrings.Registration.ModeEdit) // { // } // } //} }
private void createCommunityUser() { var tMember = TelligentService.GetPosesMember(this.CurrentMember.ScreenName); //if we have a screen name and it doesn't exist in Telligent yet... if (!string.IsNullOrEmpty(this.CurrentMember.ScreenName) && !string.IsNullOrEmpty(this.CurrentUser.Email) && tMember == null) { try { bool communitySuccess = CommunityHelper.CreateUser(this.CurrentMember.ScreenName, this.CurrentUser.Email); if (communitySuccess == false) { throw new Exception("I'm sorry, the Community User failed to be created properly."); } } catch (Exception ex) { throw ex; } } }