Support Joomla!

references:joomla.framework:environment:juri-setusername

Table of Contents

setUsername

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Environment Class JURI Method setUsername Reference setUsername() Never Work in Progress

Sets the URI username.

Syntax

void setUsername ( $user )

$user string is a string containing the new URI username.

Examples

Example

$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:

Result

Before: http://www.joomla.org?action=help#create
After: http://user:secret@www.joomla.org?action=help#create
 
references/joomla.framework/environment/juri-setusername.txt (617 views) · Last modified: 2007/08/15 14:51