public UserProfileManager(MembershipUser _user) { if (_user == null) { throw new ArgumentNullException("_user"); } UserProfile newProfile = new UserProfile(_user.UserName); ProfileBase userProfile = ProfileBase.Create(_user.UserName); ProfileGroupBase addressGroup = userProfile.GetProfileGroup("Address"); userProfile.Initialize(_user.UserName, true); newProfile.Properties.Add(new ProfileProperty("Nome", "Name", userProfile["Name"].ToString())); newProfile.Properties.Add(new ProfileProperty("Telefone", "Phone", addressGroup["Phone"].ToString())); newProfile.Properties.Add(new ProfileProperty("CEP", "CEP", addressGroup["CEP"].ToString())); newProfile.Properties.Add(new ProfileProperty("Endereço", "Street", addressGroup["Street"].ToString())); newProfile.Properties.Add(new ProfileProperty("Bairro", "Area", addressGroup["Area"].ToString())); newProfile.Properties.Add(new ProfileProperty("Estado", "State", addressGroup["State"].ToString())); newProfile.Properties.Add(new ProfileProperty("Cidade", "City", addressGroup["City"].ToString())); /*newProfile.Properties.Add(new ProfileProperty("FTP: Host", "FtpHost", ftpInfoGroup["FtpHost"].ToString())); * newProfile.Properties.Add(new ProfileProperty("FTP: Usuário", "FtpUserName", ftpInfoGroup["FtpUserName"].ToString())); * newProfile.Properties.Add(new ProfileProperty("FTP: Senha", "FtpPassword", ftpInfoGroup["FtpPassword"].ToString()));*/ this.UserProfile = newProfile; }
public static ProfileBase GetUserProfile(string userName) { ProfileBase profile = new ProfileBase(); profile.Initialize(userName, true); return(profile); }
public void Initialize(string username, bool isAuthenticated) { _profileBase.Initialize(username, isAuthenticated); }