Membership questions

J

John

Hi

1. Is it possible to disable a user without deleting?

2. Is it possible to add user fields to the membership db such as app's on
id for a user?

Thanks

Regards
 
M

Munna

Hi

1. Is it possible to disable a user without deleting?

2. Is it possible to add user fields to the membership db such as app's on
id for a user?

Thanks

Regards
1. Is it possible to disable a user without deleting?
yes... i found few tips in scott'g's blog
here it goes

"What you want to-do is actually set the "IsApproved" property on the
MembershipUser to true or false. When it is false, then the user
exists but can't login. This is similar to your active/inactive
logic

Once you set this property on the MembershipUser object, you'll also
want to call Membership.UpdateUser() and pass in this object to update
the database."

http://weblogs.asp.net/scottgu/arch...ion_2C00_-and-Security-Resources-.aspx#563921
2. Is it possible to add user fields to the membership db such as app's on

it just a database ... do whatever you want and handle them manually

Scott Mitchell wrote a beautiful serise of article on membership also
check out this

http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

Best of luck

Munna
www.munna.shatkotha.com
 
R

Registered User

Hi

1. Is it possible to disable a user without deleting?
Yes, as others have said examine the IsApproved property of the
MembershipUser type.
2. Is it possible to add user fields to the membership db such as app's on
id for a user?
Again yes. You might consider deriving MembershipProvider and
MembershipUser types specifically tor the application's needs and
requirements. Methods and properties can be added to the derived
MembershipUser type to access the additional membership functionality.

regards
A.G.
 
J

John

Thanks everyone.

Is this login correct?

Public Function EnableUser(ByVal Email As String) As Boolean
Dim User As MembershipUser = Nothing

User = Membership.GetUser(Email) ' I am using Email as username
User.IsApproved = True

Membership.UpdateUser(User)

EnableUser = (Membership.GetUser(Email).IsApproved = True)
End Function

Many Thanks

Regards

Hi

1. Is it possible to disable a user without deleting?

2. Is it possible to add user fields to the membership db such as app's on
id for a user?

Thanks

Regards
1. Is it possible to disable a user without deleting?
yes... i found few tips in scott'g's blog
here it goes

"What you want to-do is actually set the "IsApproved" property on the
MembershipUser to true or false. When it is false, then the user
exists but can't login. This is similar to your active/inactive
logic

Once you set this property on the MembershipUser object, you'll also
want to call Membership.UpdateUser() and pass in this object to update
the database."

http://weblogs.asp.net/scottgu/arch...ion_2C00_-and-Security-Resources-.aspx#563921
2. Is it possible to add user fields to the membership db such as app's on

it just a database ... do whatever you want and handle them manually

Scott Mitchell wrote a beautiful serise of article on membership also
check out this

http://aspnet.4guysfromrolla.com/articles/120705-1.aspx

Best of luck

Munna
www.munna.shatkotha.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top