code/libraries/joomlatools/component/koowa/user/provider.php
public function load($identifier, $refresh = false)
    {
        $user = $this->getObject('user');

        // Find the user id
        if (!is_numeric($identifier))
        {
            if(!$identifier = JUserHelper::getUserId($identifier)) {
                $identifier = 0;
            }
        }

        // Fetch the user
        if ($identifier == 0 || $user->getId() != $identifier)
        {
            $user = parent::load($identifier, $refresh);

            if (!$user instanceof KUserInterface)
            {
                $user = $this->create(array(
                    'id'   => $identifier,
                    'name' => $this->getObject('translator')->translate('Anonymous')
                ));
            }
        }

        return $user;
    }
public function load($identifier, $refresh = false)
    {
        $user = $this->getObject('user');

        // Find the user id
        if (!is_numeric($identifier))
        {
            if(!$identifier = JUserHelper::getUserId($identifier)) {
                $identifier = 0;
            }
        }

        // Fetch the user
        if ($identifier == 0 || $user->getId() != $identifier)
        {
            $user = parent::load($identifier, $refresh);

            if (!$user instanceof KUserInterface)
            {
                $user = $this->create(array(
                    'id'   => $identifier,
                    'name' => $this->getObject('translator')->translate('Anonymous')
                ));
            }
        }

        return $user;
    }
public function load ( $ identifier , $ refresh = false ) { $ user = $ this -> getObject ( 'user' ) ; // Find the user id if ( ! is_numeric ( $ identifier ) ) { if ( ! $ identifier = JUserHelper :: getUserId ( $ identifier ) ) { $ identifier = 0 ; } } // Fetch the user if ( $ identifier == 0 || $ user -> getId ( ) != $ identifier ) { $ user = parent :: load ( $ identifier , $ refresh ) ; if ( ! $ user instanceof KUserInterface ) { $ user = $ this -> create ( array ( 'id' => $ identifier , 'name' => $ this -> getObject ( 'translator' ) -> translate ( 'Anonymous' ) ) ) ; } } return $ user ; }
Loads the user for the given username or user id

@param string $identifier A unique user identifier, (i.e a username or user id)
@param bool  $refresh     If TRUE and the user has already been loaded it will be re-loaded.
@return KUserInterface Returns a UserInterface object.
Loads the user for the given username or user id