I used to have an offline form pulling entries like name, street, email, along with several custom fields I made. Code: <input type="text" name="home_phone" value="{$member.data.homephone}"> I now have the (offline) form outside of the aMember directory. Specifically it's now a RSformPRO/Joomla form. So my question is what do I need to add to the page to get that functionality back?
Well I don't think it will work inside Joomla, but you can try to use session variables: http://manual.amember.com/Integrating_aMember_Pro_with_website
Thanks Alex. I've tried everything from putting the session_start in the form to adding it to Joomla's public_html\index.php. It just doesn't seem to work. Nothing gets displayed. Is there any other way to do this? Is it maybe possible to pull the Joomla user and then match it up with the aMember user and pull his details? Any help is greatly appreciated!
It does not work because Joomla set own handler for php sessions. So there is no way to access standart php session that is used by aMember. Modify Joomla plugin so it will transfer additional variables from user's profile into Joomla. Then in your form inside Joomla, use variables from Joomla's user profile.
I've got a form on a wordpress page no clue if its different than Joomla but what I did was include the config file. aMember is in a different directory than Wordpress. Code: include('/home/xxxxxxxxx/public_html/members/config.inc.php'); $user = $_SESSION['_amember_user']; Then i'm able to do things like Code: <input type="text" value="<? echo $user[name_f] ?>" name="first_name"> No clue if that will help you or not.
SOLVED: Code: <?php defined('_JEXEC') or die; $jomuser = JFactory::getUser(); ?> <?php $hostname = 'localhost'; $username = 'USER'; $password = 'PASSWORD'; $dbconn = new PDO("mysql:host=$hostname;dbname=DATABASE", $username, $password); $login = $jomuser->username; $login = $dbconn->quote($login); $userInfo = $dbconn->query("SELECT login, email, city FROM amember_members WHERE login=$login")->fetch(PDO::FETCH_ASSOC); ?> <br> This is printed from aMember db: <input name="username" value="<?php echo $userInfo['login'];?>" /> <br> This is printed from aMember db: <input name="city" value="<?php echo $userInfo['city'];?>" /> <br> This is printed from Joomla db: <input name="jusername" value="<?php echo $jomuser->username;?>" />