Echo username from user id - Joomla! Forum - community, help and support
hi all!
i have third party extension displays adverts. looking echo "created (username)". able echo advert author's user id data within advert database table, accompanied data advert. however, looking convert user id users username. use $i->user_id pull current advert author's user id how go converting username? worth mentioning user id within advert table database corresponds within joomla's users database. there way of fetching username using user id?
thanks in advance!
i have third party extension displays adverts. looking echo "created (username)". able echo advert author's user id data within advert database table, accompanied data advert. however, looking convert user id users username. use $i->user_id pull current advert author's user id how go converting username? worth mentioning user id within advert table database corresponds within joomla's users database. there way of fetching username using user id?
thanks in advance!
use juser::load()
http://api.joomla.org/11.4/joomla-platform/user/juser.html#load
there 2 attributes username , name.
http://api.joomla.org/11.4/joomla-platform/user/juser.html#load
code: select all
$user=juser::load($i->user_id);
$username=$user->username;there 2 attributes username , name.
Comments
Post a Comment