Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    3
    Plugin Contributions
    0

    red flag 10 hours and counting... Account Synchronization?

    Okay.. So this is the situation... I have spent the last 10 hours trying to find a way to automatically create an account in ZenCart when a user creates an account on the main .NET application.

    This account will also need to be logged in at the same time the user logs in to the parent site, so that they will not need to log in twice.

    I have tried everything I can think of, and over my deadline trying to get this to work. It doesnt seem like too strange of a thing to do does it? I would just manually insert the user into mySql, however the Password Hashing will not match the password hashing of my site.

    Please? any ideas?

  2. #2
    Join Date
    Jul 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: 10 hours and counting... Account Synchronization?

    well.. hot damn.. =)

    DROP PROCEDURE IF EXISTS insertCustomerUpdatePassword;
    delimiter //

    create procedure insertCustomerUpdatePassword
    --
    -- Inserts a new user into the Customer Table.
    --
    (
    _email varchar(255),
    _password varchar(80),
    _firstName varchar(30),
    _lastName varchar(30),
    _address varchar(255),
    _telephone varchar (20)


    )
    begin
    declare _hashed_pass varchar(255);
    set _hashed_pass = concat(md5(concat(substring(md5(_password),1,2) , _password)) , ':' , substring(md5(_password),1,2));

    if (select count(*) from zencart.customers where customers_email_address = _email > 0 ) then
    select -1; -- email already exists in db
    else
    insert into zencart.customers
    (customers_email_address, customers_password, customers_firstname, customers_lastname,customers_address,customers_telephone )
    values
    (_email, _hashed_pass, _firstname, _lastname,_address,_telephone );
    select LAST_INSERT_ID(); -- success
    end if;
    commit;
    end;
    //

    delimiter ;

 

 

Similar Threads

  1. v150 Order Within x Hours x Minutes and It Ships Today - Customization
    By cloud9 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 1 Dec 2017, 08:34 AM
  2. v154 mySQL Local and online data synchronization or replication
    By mandeepmavi in forum General Questions
    Replies: 9
    Last Post: 4 Feb 2016, 06:30 PM
  3. Price with Tax not counting after use diferent currency and order step 2
    By KEnik in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 7 Dec 2010, 08:53 PM
  4. HELP! with customizing and inventory counting
    By mattboyden in forum General Questions
    Replies: 9
    Last Post: 20 Nov 2006, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg