Membership questions

  • Thread starter Thread starter John
  • Start date Start date
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
 
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
 
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.
 
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
 
Back
Top