source/Application/Model/User.php
public function getIdByUserName($userName)
    {
        $shopId = Registry::getConfig()->getShopId();
        $userId = DatabaseProvider::getDb()
            ->getOne(
                'SELECT `OXID` FROM `oxuser` WHERE `OXUSERNAME` = ? AND `OXSHOPID` = ?',
                [
                    $userName,
                    $shopId
                ]
            );

        return $userId;
    }
public function getIdByUserName($userName)
    {
        $shopId = Registry::getConfig()->getShopId();
        $userId = DatabaseProvider::getDb()
            ->getOne(
                'SELECT `OXID` FROM `oxuser` WHERE `OXUSERNAME` = ? AND `OXSHOPID` = ?',
                [
                    $userName,
                    $shopId
                ]
            );

        return $userId;
    }
public function getIdByUserName ( $ userName ) { $ shopId = Registry :: getConfig ( ) -> getShopId ( ) ; $ userId = DatabaseProvider :: getDb ( ) -> getOne ( 'SELECT `OXID` FROM `oxuser` WHERE `OXUSERNAME` = ? AND `OXSHOPID` = ?' , [ $ userName , $ shopId ] ) ; return $ userId ; }
return user id by user name

@param string $userName

@return false|string
return user id by user name