some help plz !

Discussion in 'aMember Pro v.4' started by pascalos, Jan 21, 2012.

  1. pascalos

    pascalos New Member

    Joined:
    Jan 21, 2012
    Messages:
    5
    having updated to v3 to v4 ,all is fine ,except i need 2 things :

    i want to check user/pass/status from an external site to allow access to it ,i only use amember as a payment system .
    im ok with login & status but pass is encrypted ..

    looked at api ,tottally confused lol !

    also howto insert something in another db when a user signup to amembers ...

    all that in php !

    thx for your time !
  2. pascalos

    pascalos New Member

    Joined:
    Jan 21, 2012
    Messages:
    5
    nobody ? it can't be that complicate ?
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You have to create integration plugin.have a look to this example:
    http://www.amember.com/docs/API/Protect
    It have everything that is necessary in order to add user from ammeber to third-party database (incl. password encryption )
  4. pascalos

    pascalos New Member

    Joined:
    Jan 21, 2012
    Messages:
    5
    thx for your time .

    unfortunately :
    i need to check login,pass,status for an amember user FROM an external script .
    also the user is not logged in amember when i do that ,he is logging from an external script .

    example:
    "select * from am_user where login ="paul' ; "
  5. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    We are working on REST API which may make it easy.

    Until it is ready, you can include aMember code, and run internal API functions. An example:
    PHP:
    <?php
    require_once 'amember/bootstrap.php';

    $login $_POST['login'];
    $pass $_POST['pass'];

    $code null;
    $user Am_Di::getInstance()->userTable->getAuthenticatedRow($login$pass$code);
    if (!
    $user) {
        echo 
    "Authentication failed. Code is [$code]. Look to amember/library/Am/Auth/Result.php for constant values\n";
    } else {
       echo 
    "Authentication OK. User status is " $user->status "\n";
       
    print_rr($user->toArray());
       
    print_rr($user->getActiveProductIds());
       
    // user is an instance of User class : application/default/models/User.php
    }
  6. pascalos

    pascalos New Member

    Joined:
    Jan 21, 2012
    Messages:
    5
    exactly what i need ! THX A LOT !!!!

Share This Page