Page 1 of 1

Create a User, Add to Role programmatically

Posted: Fri May 28, 2010 11:06 am
by joea84
Hi,

I would like to create a user and add that user to a role, using your custom membership and roles API. Can you send me a code sample, please?

Re: Create a User, Add to Role programmatically

Posted: Fri May 28, 2010 11:44 am
by mazhar
Open Website/ConLib/RegisterationDialog.ascx.cs file and have a look the code against register button. That will provide you enough information about how to register a user.

Re: Create a User, Add to Role programmatically

Posted: Wed Jun 02, 2010 3:49 pm
by joea84
Hi,

Thanks for the info.

Let's say I want to add a user to the Super User role programmatically. What code do I use? I don't see any role or group code anywhere in that file. What is the difference between a group and a role with AbleCommerce?

Re: Create a User, Add to Role programmatically

Posted: Thu Jun 03, 2010 4:00 am
by mazhar
Please read following thread
viewtopic.php?f=42&t=8712