trying to pull out the user_id. It appears in the array. but how can I use it. not listed in the wiki page. <?php include '../amember/library/Am/Lite.php'; print_r(Am_Lite::getInstance()->getUser()); $member_id =WHAT DO I PUT HERE; print_r ($member_id); ?> thanks
What I did was build a function do this. I hope this gives you some kind of idea. PHP: // @returns the aMember user if from the user name. public function get_aMember_user_id_from_username($username) { $sql = "SELECT user_id FROM amtb_user WHERE login = ? LIMIT 1"; $q = $this->db->query($sql, $username); if ($q->num_rows() >0) { return $q->row()->user_id; } } You might need to handle your own database connection because I am using CodeIgniter but hopefully you will get the idea. "amtb_user" might be different check your amember mysql install
PHP: include '../amember/library/Am/Lite.php';$user = Am_Lite::getInstance()->getUser();$member_id =$user['user_id'];print_r ($member_id); this should work for you