How to change users approval programmatically?

Vote:
 

In Episerver CMS you can check/uncheck the users active state by editing the user.

But how can you do this from code?

#119161
Mar 23, 2015 13:06
Vote:
 

Hi,

This made through the membership provider:

var user = Membership.GetUser(userName);

user.IsApproved = true;

Membership.UpdateUser(user);
#119196
Mar 23, 2015 17:48
Vote:
 

Are you talking about CMS/Site users or Relate+/Community users?

#119223
Mar 24, 2015 21:37
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.