Hi, I test API/Authentication http://www.amember.com/docs/API/Authentication with : <?php require_once '/home/infoconc/www/amember/library/Am/Di.php'; Am_Di::getInstance()->authUser->getUser(); // returns User object or null Am_Di::getInstance()->authUser->getUserId() // returns user_id or null $result = Am_Di::getInstance()->authUser->login('xxxx', 'xxxxx', '11.22.33.44'); echo $result->isValid() ? "OK" : ("failed: " . $result->getMessage()); Am_Di::getInstance()->authUser->logout(); ?> and i receive : Parse error: syntax error, unexpected T_VARIABLE in /home/infoconc/www/MyWebserviceProject/admin/main/verifmembre.php on line 5
I am four for the bug in tuto, Am_Di::getInstance()->authUser->getUserId() // returns user_id or null and is Am_Di::getInstance()->authUser->getUserId(); // returns user_id or null
but now i have this error : Fatal error: Class 'sfServiceContainerBuilder' not found in /home/infoconc/www/amember/library/Am/Di.php on line 162
Look I updated samples on http://www.amember.com/docs/API/Authentication And, all code pieces are no supposed to be running in one session. There are samples for getting currently logged-in user info, login customer, and logout customer.