public function setUserName($userName)
    {
        $user = posix_getpwnam($userName);
        if (! isset($user['uid'])) {
            throw new InvalidArgumentException(sprintf('"%s" is not a valid user name', $userName));
        }

        $this->setUserId($user['uid']);
    }
public function setUserName($userName)
    {
        $user = posix_getpwnam($userName);
        if (! isset($user['uid'])) {
            throw new InvalidArgumentException(sprintf('"%s" is not a valid user name', $userName));
        }

        $this->setUserId($user['uid']);
    }
public function setUserName ( $ userName ) { $ user = posix_getpwnam ( $ userName ) ; if ( ! isset ( $ user [ 'uid' ] ) ) { throw new InvalidArgumentException ( sprintf ( '"%s" is not a valid user name' , $ userName ) ) ; } $ this -> setUserId ( $ user [ 'uid' ] ) ; }
Defines the current user name.


@param string $userName Unix user name.

@throws RuntimeException When unable to update current user name.
Defines the current user name .