[SOLVED] - Please put JUserHelper::getUserName() back - Joomla! Forum - community, help and support
hi.
i saw in svn juserhelper::getusername() removed.
before function did excists had created same function, had load file each time.
so question: can put function back?
it makes easier develop extensions , lot of extensions have profit function.
hope hear soon ;)
ps. here code in case lost it
i saw in svn juserhelper::getusername() removed.
before function did excists had created same function, had load file each time.
so question: can put function back?
it makes easier develop extensions , lot of extensions have profit function.
hope hear soon ;)
ps. here code in case lost it
code: select all
/**
* returns username if userid exists
*
* @param string userid search on
* @return int user name or null if not found
*/
function getusername($uid)
{
// initialize variables
$db = & jfactory::getdbo();
$query = 'select username #__users id = ' . $db->quote( $uid );
$db->setquery($query, 0, 1);
return $db->loadresult();
}
why want have back? use
$user = jfactory::getuser();
$user->get('username');
instead,
$user = jfactory::getuser();
$user->get('username');
instead,
Comments
Post a Comment