المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : UserPrinicipal Enabled... Nullable type?



C# Programming
03-27-2009, 11:51 PM
How exactly do I set s user to be disabled? I can get the value.. but how do I set it:

bool? AuthenticablePrincipal.Enabled
Gets or set a Nullable boolean vlaue that speecifies whether this account can authenticate...

but how do I set it to false?


UserPrincipal getUser = UserPrincipal.FindByIdentity(context, userName);
getUser.Enabled = false;


Does not work.