Error empty PK with 3rd party plugin

Discussion in 'Integration' started by deviatelabs, Mar 17, 2015.

  1. deviatelabs

    deviatelabs New Member

    Joined:
    Mar 16, 2015
    Messages:
    2
    I am creating a 3rd party plugin to create amember with our app.
    Each time I try creating or deleting a user I get a database error even if the operation
    is successful.
    here is the create table code:


    PHP:
    public function createTable()
        {
            
    $GUID getGUID();
            
    $table = new Am_Protect_Table($this$this->getDb(), '?_users''GUID');
            
    $table->setFieldsMapping(array(
                array(
    ":".$GUID'GUID'),
                array(
    Am_Protect_Table::FIELD_LOGIN'username'),
                array(
    Am_Protect_Table::FIELD_EMAIL'email'),
                array(
    Am_Protect_Table::FIELD_PASS'password'),
               
            ));
                   
            return 
    $table;
        }
    where GUID is the PK in our app. (it has no autoincrement since we are using GUIDs)

    The error I keep getting is
    "Trying to update not a loaded Am_Record - PK is empty"

    any help is appreciated
  2. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,682
    It is necessary to check all your plugin code to say what is exactly wrong. Do you mind to contact us in helpdesk (https://www.amember.com/support) we will help you with it.

    Best Regards.

Share This Page