Support: add new user wordpress with api aMember

Discussion in 'aMember Pro v.4' started by smiddleton67, Apr 4, 2013.

  1. smiddleton67

    smiddleton67 New Member

    Joined:
    Mar 28, 2013
    Messages:
    9
    • I have site use cms wordpress and site user aMember Pro ver4.
    • I setup the same video http://www.amember.com/p/video/#wp
    • Now, on site wordpress. I write function:
      Code:
      <?php
      $url = 'http://YOURDOMAIN.COM/amember/api/users';.
       
      $fields = array(
                  '_key' => 'SECRETKEY',
                  '_format' => 'xml',
                  'login' => 'user0001',
                  'pass' => 'user0001',
                  'email' => 'user0001@yahoo.com',
                  'name_f' => 'Mr',
                  'name_l' => 'user0001',
          );
       
      $fields_string  = http_build_query($fields);
      //open connection
      $ch = curl_init();
       
      //set the url, number of POST vars, POST data
      curl_setopt($ch,CURLOPT_URL,$url);
      curl_setopt($ch,CURLOPT_POST,count($fields));
      curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
       
      //execute post
      $result = curl_exec($ch);
       
      //close connection
      curl_close($ch);
    User add to success aMember. But user haven't worpdress.
    If I login into aMember site. I update user 'user0001'. affter user update. This user add to wordpress.
    Please, help me!
    Thanks
  2. lee_pro

    lee_pro New Member

    Joined:
    Mar 26, 2013
    Messages:
    26
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You are trying to add user, but this user doesn't have an access.
    Check this user in amember, he have "pending" status, so should not have an access to content or integration.
    You should add access for this user as well.
  4. smiddleton67

    smiddleton67 New Member

    Joined:
    Mar 28, 2013
    Messages:
    9
    The manual, I am created the new and out of sync user successfully.
    Thanks you very much!

Share This Page