Create a User, Add to Role programmatically

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
joea84
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Wed May 26, 2010 11:55 am

Create a User, Add to Role programmatically

Post by joea84 » Fri May 28, 2010 11:06 am

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?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Create a User, Add to Role programmatically

Post by mazhar » Fri May 28, 2010 11:44 am

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.

joea84
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 27
Joined: Wed May 26, 2010 11:55 am

Re: Create a User, Add to Role programmatically

Post by joea84 » Wed Jun 02, 2010 3:49 pm

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?

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Create a User, Add to Role programmatically

Post by mazhar » Thu Jun 03, 2010 4:00 am

Please read following thread
viewtopic.php?f=42&t=8712

Post Reply