Forums

get alias field from database

omissirev 06 May, 2009
HI
I am trying to show the controls of editing and deleting only to the user's associated to the contact list.. I tried this but it's not working. The error seems to be that "{alias}" but I don't know another way to do this..

<?php $user = &JFactory::getUser();
if ($user->username == {alias}) 
echo '<td style="width: 5%;">{edit_record} {delete_record}</td>'; ?> 
omissirev 06 May, 2009
I managed to do what I wanted like this:

<?php $user = &JFactory::getUser(); 
if($row->alias == $user->username){ ?>
<td style="width: 5%;">{edit_record} {delete_record}</td>
<?php } ?>


Hope this helps someone as noob as I am 😀
Max_admin 08 May, 2009
Thanks for sharing this!🙂

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.