Import User, and reset password

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
kastnerd
Commodore (COMO)
Commodore (COMO)
Posts: 474
Joined: Wed Oct 22, 2008 9:17 am

Import User, and reset password

Post by kastnerd » Fri Mar 06, 2009 8:48 pm

Id like to import users, But i can not import there passwords due to them being hashed.

I would like to input a random password so i can import them in to user groups. Then i would want to send them the forgot password email. that has a link to reset there password.
Is there a automatic script i could run to send about 1,500 forgot password emails.

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

Re: Import User, and reset password

Post by mazhar » Thu Mar 12, 2009 8:12 am

Try following code to send password reset request to all store users

Code: Select all

CommerceBuilder.Users.UserCollection users = CommerceBuilder.Users.UserDataSource.LoadForStore();
        foreach (CommerceBuilder.Users.User user in users)
            user.GeneratePasswordRequest();

musthavebag
Ensign (ENS)
Ensign (ENS)
Posts: 9
Joined: Fri Sep 12, 2008 8:41 am

Re: Import User, and reset password

Post by musthavebag » Sun May 10, 2009 7:50 pm

Hi Mahzar,
Can you tell me where we put that code to run the script to send a password request to all users? We are launching our new site tonight and want to send that out as a marketing / reset password email to the users tomorrow. Thanks!
-Christina Brandstrom, Must Have Bag

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

Re: Import User, and reset password

Post by mazhar » Mon May 11, 2009 3:01 am

viewtopic.php?f=42&t=9207
Read following thread's second post having latest attachment. You can place code in a very similar location. For example you can just rename unlock all button caption to Reset Password Request and then you can place above code in UnlockAllUsers_Click method.

Post Reply