High level, when editing a user, I don't know who the user is when on the User Payments tab. Programatically, I see I have available in the code the user's first/last name on the User Info tab, but that info isn't then available on other tabs. How can I persist the user's name across all the user edit tabs?
Display User Info in Admin I had the same request and Alex, gave me the following, which work well. Thanks Alex. So, here is the code for you. edit /amember/admin/users.php file. Add these rows: $u = $db->get_user($member_id); $t->assign('u', $u); before: $t->display('admin/user_payments.html'); Then add these rows to /amember/templates/admin/user_payments.html file: {u.name_f} {u.name_l}, {u.email} In the user_payments.html file, the above code jsut gives you all black text, which is fine, but I wanted it easier to see who and what. So, I modified the code a bit. The Login name and First and Last, are in Red, to show up better and easier. My code: <h3>{$title}</h3> <h4>Email/Login: <span class="style1">{$u.login}</span> Names:<span class="style1"> {$u.name_f} </span>&<span class="style1"> {$u.name_l}</span></h4> I am using Vers. 3.08 btw. Rusty
Hi! I am also using 3.0.8 PRO. This little mod was something I was looking for and wonder why this is not in the script itself. I do consider it necessary to be included in the basic pakage which may help everyone. What I also find it interesting is to offer some more globle variables from aMember table fields - AND - other tables outside from aMemeber, like Joomla, etc. Hence the config could be: 1. Field config, Name, ID, etc in ext_1.config.inc.php. 2. Connection details to a different database and tables as $pc_ext_1 = array(); $pc_ext_1['db'] = ... 3. User of tags in the templates.
Hallo! May be the best is to add my suggestion in the default distribution of the aMember Pro. Well, I did insert the above solution and found out that it did not appear in all the modes, although the suggested solution is correct. I find the following to be a much better solution, which infact achieves much more: Add in the user_nb_inc.html the following: <table width=100% cellspacing=1 cellpadding=0 class=notebook><tr> <td width={$pc} class=notsel> First name: {$u.name_f} </td> <td width={$pc} class=notsel> Last name: {$u.name_l} </td> <td width={$pc} class=notsel> Username: {$u.login} </td> </tr> </table> before the following line: <table width=100% cellspacing=1 cellpadding=0 class=notebook><tr> And this will show details in each page of the user. Mind you that if a user has never logged in, the Access.log page will not show for some funny reasons any details!
To Draj I took your suggestion and used the following code in user_nb_inc.html. <table width=100% cellspacing=1 cellpadding=0 class=notebook><tr> <td width={$pc} class=notsel> First name: {$u.name_f} </td> <td width={$pc} class=notsel> Last name: {$u.name_l} </td> <td width={$pc} class=notsel> Username: {$u.login} </td> </tr> </table> I added it before the following line: <table width=100% cellspacing=1 cellpadding=0 class=notebook><tr> However, the fields are blank on the User Payments/Subscription page. They show on the Actions page and on User Info page. Do you know why?
This will require /amember/admin/users.php modification and dependfs on version you have. Please contatc support we will help.