By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,422 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,422 IT Pros & Developers. It's quick & easy.

how to change email defined when creating account?

P: n/a
Dan
Hi,

I use the <asp:CreateUserWizardcontrol for creating memberusers. In that
windows, one must provide an emailaddress.
My question is: how can an user later change his emailaddress?

Thanks
Dan
Feb 13 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Dan,

My guess is you are using the SqlRoleProvider for storing your user
information? One thing you could do is have a page that directly edits this
database.

Also, you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task.

Shaun McDonnell
"Dan" <d@d.dwrote in message news:uD**************@TK2MSFTNGP05.phx.gbl...
Hi,

I use the <asp:CreateUserWizardcontrol for creating memberusers. In
that windows, one must provide an emailaddress.
My question is: how can an user later change his emailaddress?

Thanks
Dan
Feb 13 '07 #2

P: n/a
Dan
Thanks for replying.
Yes i use the sqlserver express as database for users and memberships. It's
the easiest way i suppose. The mdf file is created automatically.
To be honest, i don't understand very good what you mean with:
"you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task".
Could you give some hints how to perform that?
Thanks again.
"Shaun C McDonnell" <sm**************@eisoft.comschreef in bericht
news:CF**********************************@microsof t.com...
Dan,

My guess is you are using the SqlRoleProvider for storing your user
information? One thing you could do is have a page that directly edits
this
database.

Also, you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task.

Shaun McDonnell
"Dan" <d@d.dwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
>Hi,

I use the <asp:CreateUserWizardcontrol for creating memberusers. In
that windows, one must provide an emailaddress.
My question is: how can an user later change his emailaddress?

Thanks
Dan

Feb 13 '07 #3

P: n/a
Dan,

Here is an example of what I am talking about. Check out the methods you
can call within the Membership object. There is a method called
'ChangePassword'

By creating your own MembershipProvider you could override this method and
have a custom task performed when a user attempts to change its password.
Here is an example:

public class DansMembershipProvider : System.Web.Security.MembershipProvider
{
public ovverride bool ChangePassword(string username, string
oldPassword, string newPassword)
{
// perform your password change task here.
}
}

You will have to override all of the methods within the MembershipProvider
class in order for it to be operable. On some, you can just call the base
method (the original method) by doing the following:

base.DeleteUser(string username, bool deleteAllRelatedData);

When you are done, make the following change to your web.config file:
<membership defaultProvider="DansMembershipProvider">
<providers>
<add name="DansMembershipProvider" type="DansMembershipProvider,
DansMembershipProviderAssembly"/>
</providers>
</membership>

Then, whenever you make calls to the methods within the Membership object,
it will call your custom methods.

Good luck.

Shaun McDonnell

"Dan" <d@d.dwrote in message news:OA**************@TK2MSFTNGP06.phx.gbl...
Thanks for replying.
Yes i use the sqlserver express as database for users and memberships.
It's the easiest way i suppose. The mdf file is created automatically.
To be honest, i don't understand very good what you mean with:
"you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task".
Could you give some hints how to perform that?
Thanks again.
"Shaun C McDonnell" <sm**************@eisoft.comschreef in bericht
news:CF**********************************@microsof t.com...
>Dan,

My guess is you are using the SqlRoleProvider for storing your user
information? One thing you could do is have a page that directly edits
this
database.

Also, you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task.

Shaun McDonnell
"Dan" <d@d.dwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
>>Hi,

I use the <asp:CreateUserWizardcontrol for creating memberusers. In
that windows, one must provide an emailaddress.
My question is: how can an user later change his emailaddress?

Thanks
Dan

Feb 13 '07 #4

P: n/a
Dan
Thanks
Strange that the possibility for changing the email is not foreseen, just
like changing the password ...No?

"Shaun C McDonnell" <sm**************@eisoft.comschreef in bericht
news:33**********************************@microsof t.com...
Dan,

Here is an example of what I am talking about. Check out the methods you
can call within the Membership object. There is a method called
'ChangePassword'

By creating your own MembershipProvider you could override this method and
have a custom task performed when a user attempts to change its password.
Here is an example:

public class DansMembershipProvider :
System.Web.Security.MembershipProvider
{
public ovverride bool ChangePassword(string username, string
oldPassword, string newPassword)
{
// perform your password change task here.
}
}

You will have to override all of the methods within the MembershipProvider
class in order for it to be operable. On some, you can just call the base
method (the original method) by doing the following:

base.DeleteUser(string username, bool deleteAllRelatedData);

When you are done, make the following change to your web.config file:
<membership defaultProvider="DansMembershipProvider">
<providers>
<add name="DansMembershipProvider" type="DansMembershipProvider,
DansMembershipProviderAssembly"/>
</providers>
</membership>

Then, whenever you make calls to the methods within the Membership object,
it will call your custom methods.

Good luck.

Shaun McDonnell

"Dan" <d@d.dwrote in message
news:OA**************@TK2MSFTNGP06.phx.gbl...
>Thanks for replying.
Yes i use the sqlserver express as database for users and memberships.
It's the easiest way i suppose. The mdf file is created automatically.
To be honest, i don't understand very good what you mean with:
"you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task".
Could you give some hints how to perform that?
Thanks again.
"Shaun C McDonnell" <sm**************@eisoft.comschreef in bericht
news:CF**********************************@microso ft.com...
>>Dan,

My guess is you are using the SqlRoleProvider for storing your user
information? One thing you could do is have a page that directly edits
this
database.

Also, you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task.

Shaun McDonnell
"Dan" <d@d.dwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
Hi,

I use the <asp:CreateUserWizardcontrol for creating memberusers. In
that windows, one must provide an emailaddress.
My question is: how can an user later change his emailaddress?

Thanks
Dan


Feb 13 '07 #5

P: n/a
Yes, but there is an UpdateUser method which will perform that task.

Shaun McDonnell

"Dan" <d@d.dwrote in message news:uN*************@TK2MSFTNGP04.phx.gbl...
Thanks
Strange that the possibility for changing the email is not foreseen, just
like changing the password ...No?

"Shaun C McDonnell" <sm**************@eisoft.comschreef in bericht
news:33**********************************@microsof t.com...
>Dan,

Here is an example of what I am talking about. Check out the methods you
can call within the Membership object. There is a method called
'ChangePassword'

By creating your own MembershipProvider you could override this method
and have a custom task performed when a user attempts to change its
password. Here is an example:

public class DansMembershipProvider :
System.Web.Security.MembershipProvider
{
public ovverride bool ChangePassword(string username, string
oldPassword, string newPassword)
{
// perform your password change task here.
}
}

You will have to override all of the methods within the
MembershipProvider class in order for it to be operable. On some, you
can just call the base method (the original method) by doing the
following:

base.DeleteUser(string username, bool deleteAllRelatedData);

When you are done, make the following change to your web.config file:
<membership defaultProvider="DansMembershipProvider">
<providers>
<add name="DansMembershipProvider" type="DansMembershipProvider,
DansMembershipProviderAssembly"/>
</providers>
</membership>

Then, whenever you make calls to the methods within the Membership
object, it will call your custom methods.

Good luck.

Shaun McDonnell

"Dan" <d@d.dwrote in message
news:OA**************@TK2MSFTNGP06.phx.gbl...
>>Thanks for replying.
Yes i use the sqlserver express as database for users and memberships.
It's the easiest way i suppose. The mdf file is created automatically.
To be honest, i don't understand very good what you mean with:
"you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task".
Could you give some hints how to perform that?
Thanks again.
"Shaun C McDonnell" <sm**************@eisoft.comschreef in bericht
news:CF**********************************@micros oft.com...
Dan,

My guess is you are using the SqlRoleProvider for storing your user
information? One thing you could do is have a page that directly edits
this
database.

Also, you could inherit your code from MembershipProvider and use the
ChangeEmailAddress method to perform your task.

Shaun McDonnell
"Dan" <d@d.dwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
Hi,
>
I use the <asp:CreateUserWizardcontrol for creating memberusers. In
that windows, one must provide an emailaddress.
My question is: how can an user later change his emailaddress?
>
Thanks
Dan
>


Feb 14 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.