|
-
Apr 25th, 2008, 11:06 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] [2005] ProfileManager, Update User Profile?
I don't see a method in the ProfileManager class that lets me update a user's profile. I know that I can use the Profile class for the currently authenticated user, but I want to enable the administrators to edit a user's profile. How can I achieve this? Can it be done using the ProfileManager?
Note: I am using the following:
SqlMembershipProvider
SqlProfileProvider
SqlRoleProvider
-
Apr 26th, 2008, 06:10 AM
#2
Re: [2005] ProfileManager, Update User Profile?
Membership.GetUser() is overloaded, you can use another method to get a user and update their details.
-
Apr 26th, 2008, 12:11 PM
#3
Thread Starter
Frenzied Member
Re: [2005] ProfileManager, Update User Profile?
 Originally Posted by mendhak
Membership.GetUser() is overloaded, you can use another method to get a user and update their details.
Membership.GetUser() returns a MembershipUser object. The MembershipUser does not contain Profile information that is specified by the <Profile> -> <Properties> element in the Web.Config.
Any other ideas?
-
Apr 27th, 2008, 08:19 PM
#4
Thread Starter
Frenzied Member
Re: [2005] ProfileManager, Update User Profile?
I was able to get an answer on another forum.
For those that may find this thread later, I ended up using the ProfileCommon class to manage a user's profile. Here is a code example.
Code:
' This example assumes there are profile properties FirstName and LastName
Public Sub UpdateUserProfile(ByVal username As String)
Dim usersProfile as ProfileCommon = New ProfileCommon
userProfile = Profile.GetProfile(username)
With userProfile
.FirstName = FirstNameTextBox.Text
.LastName = LastNameTextBox.Text
End With
userProfile.Save()
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|