====== setUsername ====== {#JAPI Joomla.Framework Environment JURI::setUsername #} Sets the URI username. ===== Syntax ===== void setUsername ( **$user** ) | **$user** | string | is a string containing the new URI username. | ===== Examples ===== $uri = new JURI( 'http://www.joomla.org?action=help#create' ); echo "Before: " . $uri->toString(); $uri->setUsername( 'user' ); $uri->setPassword( 'secret' ); echo "After: " . $uri->toString(); might produce: Before: http://www.joomla.org?action=help#create After: http://user:secret@www.joomla.org?action=help#create