Importing users changes Status from 1 to 0

Discussion in 'Troubleshooting' started by twholycross, Mar 5, 2007.

  1. twholycross

    twholycross aMember Pro Customer

    Joined:
    Jan 30, 2007
    Messages:
    63
    I used the provided import features to import 500 users, but importing the member_id is not permited so I then exported the data with PHPMyAdmin and changed the member_id to the number it should have. In this download the STATUS column is populated with 1. All users are active. When I import the data now via PHPMyAdmin the status for each customer changes to 0. Why? How can I fix this?

    TIA
  2. draj

    draj New Member

    Joined:
    Dec 29, 2006
    Messages:
    252
    Hi!

    I have done this manytimes. You cannot just do it like you did.

    If you want to have your own member_ids then you need to first get them in aMember_databases with the member_id the scripts creates, thereafter write a new function to change it.

    So for instance:

    1. Create a new SQL field that stores your personal member_ids, called as my_ids field_name.

    2. Import all of th data through import provided, togather with the my_ids.

    3. Write a new function that changes and substitutes the my_ids > member_id in the amember_member & amember_products.

    function changs_ids () {

    call my_ids, member_id SELECT from amember_member

    UPDATE amember_member SET member_id = my_id

    Then

    SELECT payment_id in amember_products where $mem_member_id = $pay_member_id

    UPDATE amember_products SET member_id = my_id

    }

    Thats how you can make it work.
  3. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    You have to change also member_id in amember_payments table, else users don't have any subscriptions and of course get 0 (pending) status.

Share This Page